|
| 19 Nov 2011 05:57 PM |
game.Players.PlayerRemoving:connect(function(plr) plr:WaitForDataReady() p = plr:FindFirstChild("Points") if p then plr:SaveNumber("Points",p.Value) end end)
--^--*Save*--
game.Players.PlayerAdded:connect(function(plr) plr:WaitForDataReady() --[[p = Instance.new("NumberValue") p.Name = "Points"]] p = plr:LoadNumber("Points") pnts = plr:FindFirstChild("Points") if pnts then pnts.Value = p end end)
--^--*Load*-- |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2011 06:43 PM |
| In the first one, the player's data is already loaded so you don't need the WaitForDataReady. That may cause the script to run later and not be able to save the player's data. |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2011 10:39 PM |
| No, http://wiki.roblox.com/index.php/Data_Persistence_Complete_Guide it has WaitForDataReady even there. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Nov 2011 10:53 PM |
What does the output read? If it doesn't read anything, then the problem might be that, as the wiki says, the player removing function is too short to use. Try making a constant saver in the form of a GUI.
Sincerely, Noobertuber |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2011 11:22 PM |
| Dude, how am I supposed to get an output? |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2011 11:57 PM |
@flappydavid make an output gui like i did |
|
|
| Report Abuse |
|
|