I was wondering how to change the value of an IntValue using a script but it isn't working. I am trying to make a currency system. Here is the code I have (new to scripting in Roblox): `local playerdata = game.Players.LocalPlayer:WaitForChild("leaderstats")
if playerdata.Coins.Value == 0 then
playerdata.Coins.Value = 20000
end`

2 comments
are you getting any errors cause that codes should work
Did you made the leaderstats and coins