|
| 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 |
|
|
| |
|
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 |
|
|
|
| 18 Feb 2016 04:52 AM |
Would this be correct???
stats = Instance.new("Players", player) -- Model, not IntValue stats.Name = "leaderstats"
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|