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 » Scripters
Home Search
 

Re: two leaderboards arent working

Previous Thread :: Next Thread 
ExplodeLikeAVolcano is not online. ExplodeLikeAVolcano
Joined: 02 Nov 2013
Total Posts: 12146
17 Dec 2016 07:31 PM
I have a stage leaderboard and a credits leaderboard, two seperate scripts, and sometimes either one works, but then at the same time, one doesn't.

1st:
game.Players.PlayerAdded:connect(function(player)

local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
leaderstats.Parent=player

local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 0
stage.Parent=leaderstats
end)

2nd:
game.Players.PlayerAdded:connect(function(player)

local leaderstats = Instance.new("IntValue", player)
leaderstats.Name = "leaderstats"
leaderstats.Parent=player

local points = Instance.new("IntValue")
points.Name = "Credits"
points.Value = 0
points.Parent=leaderstats
end)


Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
17 Dec 2016 07:36 PM
game.Players.PlayerAdded:connect(function(plr)

local leaderstats=Instance.new("Folder")
leaderstats.Name="leaderstats"
leaderstats.Parent=plr


local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 0
stage.Parent=leaderstats

local points = Instance.new("IntValue")
points.Name = "Credits"
points.Value = 0
points.Parent=leaderstats

end)


Should work completely fine..
Report Abuse
HeIIoISteaIUsernames is not online. HeIIoISteaIUsernames
Joined: 26 Oct 2012
Total Posts: 2906
17 Dec 2016 07:36 PM
i think you should remove the points.Value and stage.Value


intvalue already has a zero for the value so you dont need to put it there


i steal usernames
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
17 Dec 2016 07:39 PM
Yeah, by default their value is 0. The game probably also gets confused because you have two "leaderstats". Put it into one.
Report Abuse
ExplodeLikeAVolcano is not online. ExplodeLikeAVolcano
Joined: 02 Nov 2013
Total Posts: 12146
17 Dec 2016 09:24 PM
Still broken


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Dec 2016 09:29 PM
probably because the leaderstats are named the same. just combine them duh


Report Abuse
ExplodeLikeAVolcano is not online. ExplodeLikeAVolcano
Joined: 02 Nov 2013
Total Posts: 12146
17 Dec 2016 10:27 PM
one of them has a -


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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