So I'm making a roleplay type game and I want it to give cash every 5 seconds but it isn't working. This is a script in the ServerScriptService. Here is the code
local plr = game.Players.LocalPlayer
while true do
plr.leaderstats.Cash.value = plr.leaderstats.Cash.value + 5
wait(5)
end
If you know what is wrong send me the new code. leaderstats is a model not folder. The error is 16:37:15.276 - ServerScriptService.Script:5: attempt to index nil with 'leaderstats' Thanks!
