Hello, i am making a game with abilities that have cooldowns. I want to know if their was anything wrong with using cooldowns in a local script (debounce). For example:
debounce = true
wait(0.5)
debounce = false.
could a player Manipulate this cooldown and make it 0 seconds, meaning they have no cooldowns or could players not alter local script code?
Yes they could, an exploiter is able to make the wait(0.5) turn into wait(0) with ease. You should really be handling cooldowns on the server, the client should always REQUEST to do an ability, it should never do one on its own. I would suggest handling cooldowns on the server with os.time() (or os.clock apparently), this would make it impossible to exploit your abilities.
alright this is good because i just recently started converting cooldowns to server. Youtube tutorials always show cooldowns being done on client so im guessing a lot of people get confused, also after a certain amount of time i fire client, which stops the cooldown. Is this a good idea?
I’m not entirely sure what you mean, but if you’re talking about telling the client to stop their cooldown on the server, then yes, this is a pretty bad idea. Again, you should just continue using cooldowns on the server, remember that an exploiter can break ANYTHING thats on the client.