My gun system works by creating bullets and moving them on the client who fired, and also sends the information to the other clients so they can see the bullets. The damaging system uses a remote event to tell the server that the bullet has hit a player. Unfortunately, the client can spam those event and basically loop-kill everyone. How can I secure this system? Thanks!
You could trigger an event to the server from the client when the player fires the gun, and create the bullets on the server.
The bullet movement system uses RunService.RenderStepped, which doesn’t work on the server.
Can you use RunService.Stepped or RunService.Heartbeat instead?
If you REALLY don’t want lag, you could send to all clients that a bullet was fired, and each of them could render a bullet, but only do the killing on the server (via raycasts).
2 Likes
I will try RunService.Heartbeat. thanks
1 Like