Do I need to add cooldowns to my Remote Events?

Hello,

I have a remote event to change teams, I am checking first on the client if they are already on that team or not, if they are not then the event will fire. I am aware that an exploiter could spam my remote events? Does this mean I’d have to add a cooldown to stop this? Or would the server check which only continues the script if the player isn’t already on that team be enough?

Thanks,

Pyxrien.

If the team switch server event is performing a lot of calculations, then you should probably add a cooldown so exploiters don’t crash or lag your server by switching between teams rapidly. If it’s just a simple 1-3 line team switch then it’s probably not gonna affect performance that much.

2 Likes

What is happening is that when fired, it checks if the player is already that team, if not then it will simply add them to a table.

Do you think this is nothing to worry about?

Thanks for the response!

Pyxrien.

I don’t think that will impact the performance much. You can spam the remotes yourself in a LocalScript to see if it spikes the ping or does anything harmful to the game

2 Likes