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

Why does my leaderboard script show only one of the 4 values in game?

function PlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Parent = newPlayer
stats.Name = "leaderstats"

local coins = Instance.new("IntValue")
coins.Parent = stats
coins.Name = "Coins"
coins.Value = 0

local diamonds = Instance.new("IntValue")
diamonds.Parent = stats
diamonds.Name = "Diamonds"
diamonds.Value = 0

local level = Instance.new("IntValue")
level.Parent = stats
level.Name = "Level"
level.Value = 0

local exp = Instance.new("IntValue")
exp.Parent = stats
exp.Name = "Exp"
exp.Value = 0

end

game.Players.ChildAdded:connect(PlayerEntered)

Could someone help me? In the actual game server when i test the leaderboard only one of the values has 0, the rest have no value, just the name, help please?

1 answer

✓ Accepted answer

I just tested it and it works in both studio and server. What exactly is the problem? It does show the value for me

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