Remotes debounced client side?

When I script things that require user input, I don’t usually debounce remote firing on client, I would just do all the checks on server because syncing debounces would be stressful. I wonder if its bad practice doing this, and I should add a debounce on client?

1 Like

I would personally, because if there is no debounce then the client could start spamming the server with RemoteEvent requests

In these situations, I would most definitely add a debounce to both the Client and the Server.

The debounce on the server is mainly for security reasons, or specific to the mechanics executed upon receiving those events. If a player is spamming a button or spamming an ability in your game, it is very unlikely that that action can actually be repeated that often. Even when offering a purchase button for items that will likely be purchased many times in succes, I would definitely suggest adding even the slightest debounce and have the server reject all incoming remotes within that debounce timeframe.

On the client, your main reason to implement a debounce is to avoid overloading the remote queue. If you know the server is already going to reject these remotes, there is no use in letting the client send them. Additionally, this can also give the player better feedback as to how often the remote is actually fired / the action is executed.

The result are two debounces, one for input on the client and the other for verification on the server. If you make the server debounce slightly shorter than the client debounce, the player will never notice the debounce is there but will be prevented from spamming your remote queue through exploits.

Can you give us some more context in regards to what you are using remote debounces for? It’s quite situation-specific, and we could give better advice knowing which situation you are running into.

To be specific, every time the client clicks said button I do an ability and then debounce that ability on the server for a second using tick(), I have also used an object value to represent this to the client, however using this method the ability suddenly becomes unsmooth

I am also sending no data over, so I won’t exceed the 50kb/s limit