Okay, the title is sure very confusing.
The thing is, I have a function that is connected to the Event
event of a BindableEvent, for instance.
The Event fires whenever the gui is interacted with.
The function hides the gui if it is not interacted with for a set amount of time.
Now, this function doesn't run if it is already running,
but I'd like to know how to do that, the script waits 3 seconds. If in those 3 seconds the gui is intercated with, the function stops running doing nothing. If in those 3 seconds the BindableEvent doesn't get fired, the gui will hide.
Now, how would I make this function stop running if It's in that 3 second loop whenever that Event
Event is fired?
Help is appreciated! Thanks!
I am not requesting code, but seeking for help on how to achieve this.
I think returnig 'end' will do:
if script.Parent.MouseButton1Click then return end