Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

What type of script is this, server or local? (or possible module)

0

Check out my answer and if it didn't help go check out someone elses answer.

2 answers

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

1 comment

0

of cource i did that my studio is broken?

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.