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 4 years ago

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

01game.Players.PlayerAdded:Connect(function(plr)
02    local start = Instance.new("Folder")
03    start.Parent = plr
04    start.Name = "leaderstats"
05 
06    local coin = Instance.new("IntValue")
07    coin.Value = 0
08    coin.Name = "Coins"
09    coin.Parent = start
10 
11end)
0
What type of script is this, server or local? (or possible module) WideSteal321 773 — 4y
0
Check out my answer and if it didn't help go check out someone elses answer. WideSteal321 773 — 4y

2 answers

Log in to vote
2
Answered by 4 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 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 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