Server remotes unintendedly firing multiple times

I have made this script so I don’t need to make it for every single remote event which undergoes the same steps.

The problem with this is that it OnServerEvent fires 3-4 times. I have tried printing but the client is only firing once and the server event gets fired a lot of times.
Issue was that the server script was in Starter Gui…

This indicates you are doing something wrong, likely on the client. I am not entirely sure why you need to be listening to OnServerEvent like this either. Depending on your situation you could be using one server event instead, or some sort of ModuleScript/BindableEvent.

Highly unrecommended but Band-Aid solution would be to use a table to keep track of all the players and remove them from the table after x amount of time, basically treating the table as a debounce. Again this is merely a Band-Aid and unrecommended, you should fix the issue in your code instead.

1 Like

Wait, I have my server script in starter gui. Will that make any difference? Yes, this fixed. Server script shouldn’t be in starter gui…