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: Can't Understand Why Leaderboard with no errors don't work

Previous Thread :: Next Thread 
swissmonk140 is not online. swissmonk140
Joined: 21 Jan 2008
Total Posts: 187
18 Feb 2016 04:40 AM
Guys, I have this scripted leaderboard but it doesnt work, for some reason the int values never actually create themselves, the script is in "workspace" is normal script, not a local script, or anything like that, and I only see int value "leaderstats" when i start the server and see the values inside of character, Here is script that has "no" errors apparently.



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

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

Strength = Instance.new("IntValue", stats)
Strength.name = "Strength"
Strength.Value = 5

Agility = Instance.new("IntValue", stats)
Agility.name = "Agility"
Agility.Value = 3

Money = Instance.new("IntValue", stats)
Money.name = "Money"
Money.Value = 500

Kills = Instance.new("IntValue", stats)
Kills.name = "Heads"
Kills.Value = 0

Deaths = Instance.new("IntValue", stats)
Deaths.name = "Deaths"
Deaths.Value = 0
end)
Report Abuse
swissmonk140 is not online. swissmonk140
Joined: 21 Jan 2008
Total Posts: 187
18 Feb 2016 04:43 AM
pls helps me
Report Abuse
Graidlyz is not online. Graidlyz
Joined: 25 Dec 2011
Total Posts: 13357
18 Feb 2016 04:45 AM
game.Players.PlayerAdded:connect(function(player)

stats = Instance.new("Model", player) -- Model, not IntValue
stats.Name = "leaderstats"

Strength = Instance.new("IntValue", stats)
Strength.name = "Strength"
Strength.Value = 5

Agility = Instance.new("IntValue", stats)
Agility.name = "Agility"
Agility.Value = 3

Money = Instance.new("IntValue", stats)
Money.name = "Money"
Money.Value = 500

Kills = Instance.new("IntValue", stats)
Kills.name = "Heads"
Kills.Value = 0

Deaths = Instance.new("IntValue", stats)
Deaths.name = "Deaths"
Deaths.Value = 0
end)


Report Abuse
swissmonk140 is not online. swissmonk140
Joined: 21 Jan 2008
Total Posts: 187
18 Feb 2016 04:52 AM
Would this be correct???


stats = Instance.new("Players", player) -- Model, not IntValue
stats.Name = "leaderstats"
Report Abuse
HRnSN is not online. HRnSN
Joined: 22 Jun 2009
Total Posts: 1276
18 Feb 2016 04:55 AM
-- Name is case censitive

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

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

Strength = Instance.new("IntValue", stats)
Strength.Name = "Strength"
Strength.Value = 5

Agility = Instance.new("IntValue", stats)
Agility.Name = "Agility"
Agility.Value = 3

Money = Instance.new("IntValue", stats)
Money.Name = "Money"
Money.Value = 500

Kills = Instance.new("IntValue", stats)
Kills.Name = "Heads"
Kills.Value = 0

Deaths = Instance.new("IntValue", stats)
Deaths.Name = "Deaths"
Deaths.Value = 0
end)
Report Abuse
swissmonk140 is not online. swissmonk140
Joined: 21 Jan 2008
Total Posts: 187
18 Feb 2016 05:00 AM
Thank you both i figured it out, I had name Case sensitive and it would seem that i needed to put it as a model? weird... Im not so sure abt the model thing but all values work properly now, they show up, but jus not all on leaderboard, But i think a gui script can Show all leaderstats? im not entirely sure.


here is my script so far, All values show crrectly, jus dont show all values on leaderboard.






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

stats = Instance.new("Model", player) -- Model, not IntValue
stats.Name = "leaderstats"

Strength = Instance.new("IntValue", stats)
Strength.Name = "Strength"
Strength.Value = 5

Agility = Instance.new("IntValue", stats)
Agility.Name = "Agility"
Agility.Value = 3

Money = Instance.new("IntValue", stats)
Money.Name = "Money"
Money.Value = 500

Kills = Instance.new("IntValue", stats)
Kills.Name = "Heads"
Kills.Value = 0

Deaths = Instance.new("IntValue", stats)
Deaths.Name = "Deaths"
Deaths.Value = 0
end)
Report Abuse
HRnSN is not online. HRnSN
Joined: 22 Jun 2009
Total Posts: 1276
18 Feb 2016 05:02 AM
I don't believe you HAVE to have it as a model, but I think it should work? As long as the name is "leaderstats".
Report Abuse
swissmonk140 is not online. swissmonk140
Joined: 21 Jan 2008
Total Posts: 187
18 Feb 2016 05:07 AM
everything is working correctly, seems just the leaderstats value can only show 4 values on screen at once, but i looked in the character, and all other values are still inside the character...
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