Cooldown for "When key is pressed" CoBlock

Screen Shot 2020-12-04 at 5.40.08 PM
This is my current code, where people can hold down the space bar to spam lasers. How would I add a cooldown to this?

You could create a lock, that prevents from calling this CoBlock again until the current one finishes and use timer inside of it. Here is an example:

Hope that helps

1 Like