Alright, How do you restart a whole function when it is called twice.
Example:
local i = 0
function Restart()
print(“function started”)
repeat wait(1)
print(“function wait”)
i = i + 1
until i = 10
print(i)
end
How would I make it so, when the function is called a second time while it is already running, it ends the currently running function, and restarts from the beginning Any help would be appreciated.