Robbing system not working

Hello, im trying to make a robbing/tycoon game and it is not working when I test it.

Script:


Output:
image

You can’t use game.Players.LocalPlayer in a Server script. What you need to do is have the player argument in your function, and then call it from there, like this:

script.Parent.PromptButtonHoldEnded:Connect(function(player)

-- Do the other stuff of course. 
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 100

end)
1 Like