I have a large amount of objects that are created on the server - but their position is tweened on the Client for performance and lag purposes. I need a way to verify that the player is touching these objects to prevent hackers, but that’s not really possible on the client as a hacker could easily bypass that.
The idea is that you destroy objects, and each voxel you destroy = 1 point. However, as the game is right now it would be extremely easy to create fake parts on the client and get points.
Here’s a video:
On server view, the objects are standing still out of view as they are only being tweened on the client, but they do exist in the server.
Is there any way I would be able to reliably have the server verify the player isn’t lying about touching these parts?
The only thought I had is the client passing over the part info (location, size, etc) to the server and the server checking that the part a) exists, and b) contains the same data the client is sending to the part it is trying to touch. The main downfall of this is that I can’t send a large number of remote events at a time so i would have to send a batch of part info and retroactively verify these are legitimate parts.
The only thing you can really do is fire a remote every time you touch a part with the part as the first argument. The server would then check if the character is near where the part should be, provided that the server knows this information.
You’d also need an anticheat to prevent teleportation.
Yeah, I think I’m just going to end up creating an array of parts the player has touched in the past ~1 second then send it to the server in intervals to prevent overloading - can’t really think of anything else.
you can create fake objects on the server, then replicate the real object on the client (and create tweens for them), minimizing the amount of parts the server creates. You can then use something like a simple .Touched for those fake objects on the server, and whenever its touched, check the player’s last position in the world and if it matches the speed at which the player is falling, give money
I actually use httpservice to generate a GUID for each model and the subsequent parts for better client synchronization, but I ran into issues with it replicating to the client for some reason.
I figure now I can just store the object itself in the list cause all objects are the same for all players, just at different position based on ping