generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Would this leaderboard script work?

Previous Thread :: Next Thread 
foofighterx is not online. foofighterx
Joined: 25 Apr 2010
Total Posts: 908
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
FlappydavidINC is not online. FlappydavidINC
Joined: 20 May 2011
Total Posts: 694
12 Jul 2011 05:33 PM
No, in fact, it won't.
Report Abuse
foofighterx is not online. foofighterx
Joined: 25 Apr 2010
Total Posts: 908
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
Darkfireyice is not online. Darkfireyice
Joined: 09 May 2010
Total Posts: 10086
12 Jul 2011 07:05 PM
*Looks at Scripting Helpers*
Report Abuse
foofighterx is not online. foofighterx
Joined: 25 Apr 2010
Total Posts: 908
13 Jul 2011 04:39 PM
omg....
Report Abuse
dekkonot is not online. 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
foofighterx is not online. foofighterx
Joined: 25 Apr 2010
Total Posts: 908
13 Jul 2011 08:53 PM
it didnt work...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image