of     1   

badfitz99
#140180466Sunday, July 13, 2014 7:53 AM GMT

So I have a levelling system, but when the player dies, he goes back to level 1, losing all of his progress. I've tried using datastore to stop this, but it was too confusing. Is there another way to do it?
badfitz99
#140180644Sunday, July 13, 2014 7:57 AM GMT

b1
Brick_man
#140180771Sunday, July 13, 2014 8:00 AM GMT

Data persistence?
badfitz99
#140180868Sunday, July 13, 2014 8:02 AM GMT

ok, I already know a bit about data persistence. I might use that
badfitz99
#140180999Sunday, July 13, 2014 8:05 AM GMT

So, like this? plr.Character["Humanoid"].Died:connect(function(plr) plr:WaitForDataReady() print("Getting data..") plr:SaveNumber('level2', level.Value) repeat wait() until plr.Character ~= nil plr.PlayerGui.level.Value = plr:LoadNumber("level2") end)
Brick_man
#140181066Sunday, July 13, 2014 8:07 AM GMT

yea, depending on how you are using it, yes. That would work fine.
badfitz99
#140181653Sunday, July 13, 2014 8:22 AM GMT

So I use it in a serverside script in workspace like this: for _, plr in pairs(game.Players:GetPlayers()) do plr.Character["Humanoid"].Died:connect(function(plr) plr:WaitForDataReady() print("Getting data..") plr:SaveNumber('level2', level.Value) repeat wait() until plr.Character ~= nil print("Data loaded!") plr.PlayerGui.level.Value = plr:LoadNumber("level2") end) end would this work?

    of     1