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)