Usually, you can set a local variable to determine whether a cool down is in action and so on preventing players from spamming an event, however exploiters can bypass this and fire the event many times a second, how could I possibly implement a cool down within the server that is specific to that one player and not the rest?
✓ ANSWER ACCEPTED
How does one create a cool down for remote events on the server side?
1 answer
✓ Accepted answer
A Table can be used to do so.
local Cooldown = {}
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent then
local Character = hit.Parent
if not Cooldown[Character] == false then return end ---If the Character is not in the table, then continue.
Cooldown[Character] = true ---Adds the Character to the table
wait(5)
Cooldown[Character] = false
end
end)
If the Player is not in the table, then add them to it. If they are in the table, then the script will ignore the rest
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
perfect thank you!