Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

How do i add a leaderboard?

Asked by 1 month 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 1 month 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 230 — 1mo
Ad

Answer this question