Raycast guns, Server-side Fire Rate check?

Hello there. I created some Raycast guns a while back which use multiple Server-side checks to prevent the client from cheating and manipulating the weapons values and hit reg.

I wish to add a fire rate server check to my guns so that the client cant manipulate the number of bullets fired per second, though, I am extremely unsure on how I would do this as I haven’t found any posts relating to it. Roughly I think it would require counting the number of times the server fires a bullet per second and then calculating the number of bullets fired in this second to see if it’s lower or equal to the weapons max fire rate, but I am unsure.

Is anyone able to give me any information or help regarding this server-side check? Would be much appreciated.

1 Like

Sounds like you need a rate limiter.

This module uses a tick to find time elapsed measure between each remote event fires depending on the player from what I skimmed through so this might be what you are looking for.