Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Help with SaveInstance/LoadInstance?

Asked by
Mr1Vgy 30
10 years ago

So I have this script, but it doesn't seem to work. Can anyone help? game.Players.PlayerAdded:connect(function(plr) local inGame = Instance.new("BoolValue", plr) inGame.Value = false inGame.Name = "inGame" local paused = Instance.new("BoolValue", plr) paused.Name = "paused" paused.Value = false plr:WaitForDataReady() local item = Instance.new("Model") local items = plr:LoadInstance("items") items.Parent = plr

while true do
    wait(1)
    plr:SaveInstance("items", plr.items)
end

end)

1 answer

Log in to vote
1
Answered by 10 years ago

Can you put all of your code in lua block please?

Ad

Answer this question