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

Player:SaveInstance

Player:SaveInstance

Oct 01 2018, 2:03 AM PST

The below code will save ‘Model’, a descendant of Workspace, to the player each time they join the game. To access this instance again, we would need to index it by it’s key, ‘Model’, as defined in the first argument of this method.

game.Players.PlayerAdded:Connect(function(Player)
    Player:WaitForDataReady() 
    Player:SaveInstance("Model", game.Workspace.Model)
end)