Is there any way I can protect my mostly client-side game from exploiters?

So my game is a 2D puzzle game with the camera locked over the puzzle, looking towards it. It is based on certain pieces of the puzzle being different colours to one another and you having to find the correct piece which will sometimes be hidden amongst other pieces of the same colour.

Unfortunately I assume exploiters will be able to change the colour of these pieces on their client so they are more easily able to complete the puzzle. Every click of the puzzle is checked on the server to make sure it’s valid. However I wanted to incorporate a score system where the fastest completed times of the puzzle would be ranked, but if they can change the colours of the pieces it kind of makes it meaningless.

Is there anything that can be done at all to mitigate this?

Screenshots of the game would be nice. I can’t understand why the colors are exploitable.

If the correct piece is exactly the same as other pieces in all ways (including attributes), there shouldn’t be a problem.

Sorry, I haven’t actually made it just yet so I can’t screenshot. Basically all the pieces are different shapes and there’s a sort of memory-game aspect to it where the pieces will all turn the same colour after being displayed as different colours.

The player then has to try to click a given piece while they are all the same colour, meaning the sides of the piece would not be visible among the surrounding pieces. All the pieces are touching with no gaps between them. I assume an exploiter would just be able to change the colours of the pieces on their client so they are able to see the sides of the pieces still.

Hope this was able to explain it.

If the server is always checking all the clicks of the puzzle, then I don’t see how the client changing the color would affect anything at all.

I understand it now, thanks.

This does seem exploitable with the parts directly being in there. I’ve got a solution, but it might be complicated.

When all pieces are set to the same color, you can instead set the parent of the pieces to nil but store them in a table, and then create a big part with the color you want. When the player clicks, their client would fire a RemoteEvent to the server with info about where it clicked to. An easy way of detecting where it clicked to is raycasting, but if possible, you should use an expression. The server takes this info and does some math to check if it is within the piece.

1 Like

Oh wow that is a really good idea, I never thought of doing it like that. I am gonna have a play around with that and see if I am able to get it to work since I plan to use some complex shapes. Thank you very much for that solution

1 Like