Reduce client to server rapid sending

so i have a button that sends to the server the name of the button and then the server loops through a folder and finds the button’s name in that folder, simple right?

well i discovered that a player can use a macro and rapidly send out to the server and essentially lag the server for everybody, so what seems logical is to put a cooldown, but i have a ton of events that fire to the server, which just is a pain to put the cooldown to each server sending event,

any help will be appreciated!

put a cooldown handler as a function
for each remote event, you can only do this x amount of times a minute per player

1 Like