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

How do i add a leaderboard?

Asked by 3 years ago

I have already asked this question and I am sorry, but it is not showing in Roblox Studio, is this a glitch with roblox studio?

game.Players.PlayersAdded:Connect(function(player)
    local stats=Instance.new("Folder")
    stats.Name="leaderstats"
    stats.Parent=player

    local power=Instance.new("IntValue")
    power.Name="Power"
    power.Value=0
    power.Parent=stats

    local cash=Instance.new("IntValue")
    cash.Name="Power"
    cash.Value=0
    cash.Parent=stats
end)

1 answer

Log in to vote
2
Answered by 3 years ago

Hello, kimbriel!

Your problem is easily fixable."stats" should be an IntValue rather than a Folder.

local stats = Instance.new("IntValue")

I hope this helps! :)

0
Could you tell me what IntValue stands for? iivSnooxy 248 — 3y
Ad

Answer this question