Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Leaderboard script malfunctioning, why does it do that?

Asked by 5 years ago

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

Log in to vote
0
Answered by
yHasteeD 1819 Moderation Voter
5 years ago

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 :)

Ad
Log in to vote
0
Answered by 5 years ago

The leaderboard value has to be named "leaderstats"

0
it might be custom HappyTimIsHim 652 — 5y
0
Post this as a comment not an answer LoganboyInCO 150 — 5y

Answer this question