Can you remove a players in-game money from a localscript or should it be in a script?

Does it matter if you for example, when a player buys something in a shop, charge them from a local script? Or should you use a remote function and do it from a script instead?

NEVER TRUST THE CLIENT, you will hear this over and over. Do all currency related things on the server, fire remote events and do SERVER side checks. Exploiters can change anything on the client, but it can’t be changed on the server. That is why you, the developer, have to make sure that you do check to make sure the player has enough money to purchase the item on the server, never check on the client.

Also do any money changes like charges, deposits, or whatever else on the Server, you can use local scripts to manipulate the players GUI and handle button clicks (recommended), but always check things on the server.

2 Likes

I would not…

actually it can, but it will update the in-game money locally since it’s from client.

so I would prefer server-sided script doing this (use RemoteEvent too)