Elopus001
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 482 |
|
|
| 03 Mar 2012 05:51 PM |
| How do you save leaderstats? Don't say anything if you don't have the answer to tell me. |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 03 Mar 2012 06:09 PM |
| player:SaveNumber(player.leaderstats["Whatever you want to save"].Value) |
|
|
| Report Abuse |
|
|
bongo555
|
  |
| Joined: 21 Nov 2010 |
| Total Posts: 132 |
|
|
| 03 Mar 2012 08:13 PM |
player.save function ("Leaderboard") if leave "[Save]" value) = 0 if respawn "[Save]" value) = 0 end
|
|
|
| Report Abuse |
|
|
|
| 03 Mar 2012 10:18 PM |
game.Players.PlayerRemoving:connect(function(p) if p:findFirstChild("leaderstats") then p:SaveInstance("SavedStatPNum"..tostring(game.PlaceId),p.leaderstats) end end) game.Players.PlayerAdded:connect(function(p) for k = 1, 60, 0.03 do wait() if p:findFirstChild("leaderstats") and p.DataReady then break end end local Loaded = nil if p:findFirstChild("leaderstats") and pcall(function() Loaded = p:LoadInstance("SavedStatPNum"..tostring(game.PlaceId)) end) then for j, v in pairs(Loaded:GetChildren()) do pcall(function() p.leaderstats[v.Name].Value = v.Value end) end end end) |
|
|
| Report Abuse |
|
|
Elopus001
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 482 |
|
| |
|
Elopus001
|
  |
| Joined: 28 Aug 2011 |
| Total Posts: 482 |
|
|
| 05 Mar 2012 06:23 PM |
| Clearly I picked a bad time. |
|
|
| Report Abuse |
|
|
| |
|