LoadInstance (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>MrNicNac
Needs :WaitForDataReady()
>MrNicNac
No longer AdminOnly.
Line 1: Line 1:
<onlyinclude>{{AdminOnlyMethod
<onlyinclude>{{Method
|name                = LoadInstance
|name                = LoadInstance
|arguments            = [[String]] key
|arguments            = [[String]] key

Revision as of 15:47, 9 July 2011

LoadInstance( String key )
Returns Instance value
Description: Loads an instance value that was previously saved to the player via SaveInstance.
Member of: Player


game.Players.PlayerAdded:connect(function(newPlayer)
	newPlayer:WaitForDataReady() -- Wait for the player's data cache to load
	p = newPlayer:LoadInstance("Model")
	p.Parent = game.Workspace
end)