Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why aren't two leaderboards displaying?

In my game that i'm currently working on, I wanted there to be a coin leader board and a level leader board. I got the coin to work with this script: game.Players.PlayerAdded:connect(function(player) stat = Instance.new("IntValue") stat.Name = "leaderstats" stat.Parent = player cash = Instance.new("IntValue") cash.Name = "Cash" cash.Parent = stat end) So I just used that again, but then it only displayed either the coin leader board with 0 and the skill leader board with a - in place of the 0, or the other way around. Anyone know how to get these to both show up?

2 comments

0

Can you pls put your code in a code block it helps ppl read it.

0

Yeah sorry, I didn't know how to do that at the time.

1 answer

✓ Accepted answer

Leaderboard gets only one holder so You cant put two holders. If You want to display more than one stat then just add more IntValues in this holders.

game.Players.PlayerAdded:connect(function(plr)
 local leaderboardholder = Instance.new("Folder", plr) -- HOLDER
 leaderboardholder.Name = "leaderstats"
local cash = Instance.new("IntValue", leaderboardholder) -- Stat No 1
cash.Name = "Cash"
local kos = Instance.new("IntValue", leaderboardholder) -- Stat No 2
kos.Name = "Kos"
end)

And You can copy these two lines, give stats names and they will be displayed on leaderboard

This discussion is preserved as it was. New answers, comments, and votes are closed.