I know what global function is but i dont know how to use it to make a script make another one stop or start running
COMMUNITY QUESTION
How to make one script make another stop using _G?
1 answer
Just check before doing anything.
If you have a function with some constant loop, you can check that the global variable says it's okay:
while wait(1) do
if _G.okay then
-- Do whatever
end
end
Similarly, for any events that you have going on.
function onTouched(hit)
if _G.okay then
-- Do whatever
end
end
blah.Touched:connect(onTouched);
This discussion is preserved as it was. New answers, comments, and votes are closed.
