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 4 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?

01game.Players.PlayersAdded:Connect(function(player)
02    local stats=Instance.new("Folder")
03    stats.Name="leaderstats"
04    stats.Parent=player
05 
06    local power=Instance.new("IntValue")
07    power.Name="Power"
08    power.Value=0
09    power.Parent=stats
10 
11    local cash=Instance.new("IntValue")
12    cash.Name="Power"
13    cash.Value=0
14    cash.Parent=stats
15end)

1 answer

Log in to vote
2
Answered by 4 years ago

Hello, kimbriel!

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

1local stats = Instance.new("IntValue")

I hope this helps! :)

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

Answer this question