I want to end a function if you press a GUI while its running. how would i do that?
Skip = Instance.new("TextButton",ScrnGui)
SKip.MouseButton1Down:connect(function()
--??
end)
I want to end a function if you press a GUI while its running. how would i do that?
Skip = Instance.new("TextButton",ScrnGui)
SKip.MouseButton1Down:connect(function()
--??
end)
Use return.
Skip = Instance.new("TextButton",ScrnGui)
Running = false
Skip.MouseButton1Down:connect(function()
if Running then
return
end
Running = true
--Your Code Here
Running = false
end)
break
This discussion is preserved as it was. New answers, comments, and votes are closed.