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

Leaderstats are Broken? I made a leaderstats but its not working

Asked by 3 years ago

hi! i made a leaderstats but its not working no output and no error but nto working pls help :) Thanks in Advanced!

game.Players.PlayerAdded:Connect(function(plr)
    local start = Instance.new("Folder")
    start.Parent = plr
    start.Name = "leaderstats"

    local coin = Instance.new("IntValue")
    coin.Value = 0
    coin.Name = "Coins"
    coin.Parent = start

end)

0
What type of script is this, server or local? (or possible module) WideSteal321 773 — 3y
0
Check out my answer and if it didn't help go check out someone elses answer. WideSteal321 773 — 3y

2 answers

Log in to vote
2
Answered by 3 years ago

I just tested the script in studio and it worked. Make sure you use a Script inside of ServerScriptService do not use a localscript

0
of cource i did that my studio is broken? ninjabluekris -4 — 3y
Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

The fix:

When using leaderstats, you cannot use a local script. The only type of script that works with this is a server script (also referred to as a script).

Additional help:

Local scripts

Server scripts

Did this help? Accept (and if you can upvote) it!

Answer this question