I need to align security and performance.
My game moves parts inside RunService | Roblox Creator Documentation.
- If I move the parts inside LocalScript, the performance is good, but the script is vulnerable to exploiters.
- If I move the parts inside the Server, the script is safe from exploiters, but the performance is poor (due to the latency of communication between the server and the client).
One of the solutions I thought was:
- Having a Heartbeat on the server, just for table calculations, without officially changing the CFrame of the objects moved… this would avoid the replication of these positions between the server and all connected players;
- At the same time, having another Heartbeat in the Localscript, doing the same Server table calculations, but there, updating the CFrame of the moved parts. This would also prevent communication between client and server.
My only concern for this solution would be: how to ensure that Server and LocalScript are synchronized in FPS?
Because if that’s not possible, this idea won’t be viable.