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

Leaderboard script malfunctioning, why does it do that?

I tried to make a leaderboard script, and it doesnt work. I copied it from my scripting book which worked ages ago, and it doesnt now.

game.Players.PlayerAdded:Connect(function(player)
	 local leaderboard = Instance.new("IntValue")
	leaderboard.Parent = player
	leaderboard.Name = "Stats"
	
	local Points = Instance.new("IntValue")
	Points.Parent = leaderboard
	Points.Name = "Money"
end) 

I see no problems in here, unless i'm just too blind to spot it.

2 answers

✓ Accepted answer

you need to name "Stats" to "leaderstats"

here is fixed script:

game.Players.PlayerAdded:Connect(function(player)
     local leaderboard = Instance.new("IntValue")
    leaderboard.Parent = player
    leaderboard.Name = "leadertats"

    local Points = Instance.new("IntValue")
    Points.Parent = leaderboard
    Points.Name = "Money"
end) 

Hope it helped :)

The leaderboard value has to be named "leaderstats"

2 comments

0

it might be custom

0

Post this as a comment not an answer

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