How to stop clients from change a Tools attributes

Hello so I have a Tool, a Rocket Launcher which has a Configuration child where I store the tools properties like how fast the bullet will be, the reload time etc.

Screenshot 2023-12-31 152750

The projectile which is a model is cloned and moved by the client.

Screenshot 2023-12-31 153851

Since I am moving and creating the projectile on the client, exploiters can change the values and change the speed or any other values. How can I stop them from changing the config values?

2 Likes

You can’t. Best you could do is put those values inside a script to make it harder for them to change, but they still can.

If you want to prevent the Client from doing that, have them be created in the Server.

1 Like

aw but if I make and move the projectile on the sever, it will look very clunky and choppy. Do we have to sacrifice security for smooth gameplay?

1 Like

You don’t necessarily have to move projectiles in the server. You can have the server fire a remote event to the Client and have them do it instead.

1 Like

I tried it before but the client projectiles and server projectile would not be synced, the server projectile would be bit behind the client one. So I decided to make the projectile for the player who fired in the tool’s local script and then it also fires a remote event to server, and the server fires a remote event to other client except the one who signaled the server

The hit would also be detected by the tool’s local script

1 Like

you can make it way harder for the client to change values by defining every configuration value in a variable and then destroying the configuration folder, the only way they could possibly change values is if they read the code and recreate the folder with the same value named and then disable then re enable the script which takes a very long time and most exploiters might give up when they don’t see config

and when an exploiter does figure it out you can just change value names

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.