Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Storing a module script with values that can reduce exploiting chances?

I'm planning on making a local script where it will find the price of an item and the price will be the text of a text label. But I'm guessing this means the client will be able to see the module script. So any exploiters could possibly lower the price so they could buy it. Is there any way I can reduce the chances? Maybe there's a certain parent in the explorer I can put the module script in? Any help will do.

Sorry that's there's no code. Hopefully, this doesn't break any rules.

1 answer

One of the most important rules of a proper client/server model in Roblox is that you should never trust the client with sensitive information (or really at all). Exploiters who know what they're doing have free range over most of the client side, so you cant really trust much coming from the client.

My recommendation is to move the purchasing stuff to the server via a RemoteEvent.

The client should send a request to the server asking to purchase some item. The server should then check if the item is available to that player and if they have enough currency to purchase the item. The client should never tell the server, "Hey, I'm gonna do this". The client should always validate or "Ask the server" before doing anything critical.

This discussion is preserved as it was. New answers, comments, and votes are closed.