PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

LoadInstance

Returns an instance that was previously saved to the player with Player/SaveInstance with the same key. Returns nil if the key doesn’t exist.

Parameters

Name Type Default Description

key

Returns

Return Type Summary

Code Samples


Player:LoadInstance

The below example would reparent the saved instance to Workspace.

game.Players.PlayerAdded:Connect(function(Player)
    if Player:WaitForDataReady() then
        local Model = Player:LoadInstance("Model")
        Model.Parent = Workspace
    end
end)