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

How do i make a leaderboard? [ CLOSED ]

Asked by 10 years ago

Hello! I need help making a Cash / Money leaderboard. These lines of scripting are confusing me...

1 answer

Log in to vote
0
Answered by
Thetacah 712 Moderation Voter
10 years ago

Very easy, actually!

game.Players.PlayerAdded:connect(function(plr)
    if plr then
        local leaderstats = Instance.new("IntValue")
        leaderstats.Name = "leaderstats" --The name of this has to be leaderstats for it to work
        local cash = Instance.new("IntValue", leaderstats)
        cash.Name = "Cash"
        cash.Value = 3
        local money = Instance.new("IntValue", leaderstats)
        money.Name = "Money"
        money.Value = 2
        leaderstats.Parent = plr
    end
end)
0
Thank you very much! DaRobux 5 — 10y
Ad

Answer this question