hi! i made a leaderstats but its not working no output and no error but nto working pls help :) Thanks in Advanced!
01 | game.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 |
11 | end ) |
I just tested the script in studio and it worked. Make sure you use a Script inside of ServerScriptService do not use a localscript
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:
Did this help? Accept (and if you can upvote) it!