chewit9
|
  |
| Joined: 22 May 2009 |
| Total Posts: 7873 |
|
|
| 22 Feb 2013 08:42 AM |
points = "EXP" points2 = "Level" points3 = "Candy"
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) p:WaitForDataReady() p.Backpack:Remove() wait() Backpack = p:LoadInstance("Backpack") Backpack.Parent = p wait() if p:FindFirstChild("Backpack") == nil then Instance.new("Backpack", p) c = game.StarterPack:GetChildren() for i = 1, #c do c[i]:clone().Parent = p.Backpack local stats = Instance.new("IntValue") stats.Name = "leaderstats" local points = Instance.new("IntValue") points.Name = points points.Value = 0 points.Parent = stats stats.Parent = p local points2 = Instance.new("IntValue") points2.Name = points2 points2.Value = 0 points2.Parent = stats stats.Parent = p local points3 = Instance.new("IntValue") points3.Name = points3 points3.Value = 0 points3.Parent = stats stats3.Parent = p local num = plr:LoadNumber("Number") p.leaderstats[points].Value = num local num2 = plr:LoadNumber("Number2") p.leaderstats[points2].Value = num local num3 = plr:LoadNumber("Number3") p.leaderstats[points3].Value = num end end end) end)
game.Players.PlayerRemoving:connect(function(p) p:WaitForDataReady() p:SaveInstance("Backpack", p.Backpack) p:SaveNumber("Number", plr.leaderstats[points].Value) p:SaveNumber("Number2", plr.leaderstats[points2].Value) p:SaveNumber("Number3", plr.leaderstats[points3].Value) end) |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 22 Feb 2013 08:51 AM |
| I'm not going to look into this until you tell us if there is any error (output) and what the problem is which you are experiencing. We cannot smell "what is wrong" because if this script runs we cannot even tell you if it's wrong because we don't know your intention with the script. |
|
|
| Report Abuse |
|
|
chewit9
|
  |
| Joined: 22 May 2009 |
| Total Posts: 7873 |
|
|
| 22 Feb 2013 08:53 AM |
| The intention is to auto save your leaderstats and backpack, the problem is it doesn't do either, and there is no output error. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 22 Feb 2013 08:55 AM |
Where are you testing this - on a server, on your computer?
What type of script is it (LocalScript, Script?) |
|
|
| Report Abuse |
|
|
chewit9
|
  |
| Joined: 22 May 2009 |
| Total Posts: 7873 |
|
|
| 22 Feb 2013 08:56 AM |
| I'm testing this on a game, and script. |
|
|
| Report Abuse |
|
|