so i want to make a 2 seconds timer since the player made an action but i need to find a way to make it in the script and when the player repeats this action timer should go back to 0 and also it can’t be wait cause the script will freeze until it will stop waiting and that is bad pls help.!
i tried to make something with connections it was smth like:
//i made an event so that kind of bad but idk how to make a connection without it //
locl connection = nil
if connection ~= nil then
connection:Disconnect()
end
Event.Event:Connect(function()
wait(2)
do thing
end)
Event:Fire()
and it wasnt working cuz the connectiong wasnt disconnecting for some reason and i have no idea how to solve this problem it shouldnt be that hard right?
i hope you can understand this language