|
| 12 Jul 2011 05:31 PM |
I am trying to make a leaderboard that makes 2 leader stats. And i dont know if i can just copy the first part of the script and paste it under and change the name of the other leaderstat. the script is right below the --'s And i am a noob at scripting so this took me a while...
------------------------------------------------------------- function Entered(player) wait() if player:findFirstChild("leaderstats") ~= nil then player.leaderstats:remove() end
stats = Instance.new("IntValue") stats.Parent = player stats.Name = "leaderstats"
money = Instance.new("IntValue") money.Parent = stats money.Name = "Cash" money.Value = 0 end if player:findFirstChild("leaderstats") ~= nil then player.leaderstats:remove() end
stats = Instance.new("IntValue") stats.Parent = player stats.Name = "leaderstats"
money = Instance.new("IntValue") money.Parent = stats money.Name = "ZombieKills" money.Value = 0 end
game.Players.PlayerAdded:connect(Entered)
c = game.Players:GetChildren() for i=1, #c do Entered(c[i]) end |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Jul 2011 07:04 PM |
so, what would be the correct way? plz Also post the right way to script this out please. if you have builders club ill pay you 26 robux. all i got left sry :3 |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2011 07:05 PM |
| *Looks at Scripting Helpers* |
|
|
| Report Abuse |
|
|
| |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 13 Jul 2011 04:43 PM |
function Entered(player) wait() if player:findFirstChild("leaderstats") ~= nil then player.leaderstats:remove() end
stats = Instance.new("IntValue", player) stats.Parent = player stats.Name = "leaderstats"
money = Instance.new("IntValue", stats) money.Parent = stats money.Name = "Cash" money.Value = 0 end
money = Instance.new("IntValue", stats) money.Parent = stats money.Name = "ZombieKills" money.Value = 0 end
game.Players.PlayerAdded:connect(Entered)
c = game.Players:GetChildren() for i=1, #c do Entered(c[i]) end |
|
|
| Report Abuse |
|
|
| |
|