Player:LoadInstance
This function 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
Default Value: ""
Returns
Code Samples
The below example would reparent the saved instance to Workspace.
Player:LoadInstance
local Players = game:GetService("Players")
local function onPlayerAdded(player)
if player:WaitForDataReady() then
local model = player:LoadInstance("Model")
model.Parent = workspace
end
end
Players.PlayerAdded:Connect(onPlayerAdded)