Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you destroy a loop within a module script?

Asked by 5 years ago

So as some would know, you can require functions from a module script, but lets say the function has a loop in it for example it clones a part that holds an billboard gui that goes through a series of messages using "While wait(3) do", but what if we want to remove this part using the same module if that's possible? I tried it and the loop continues despite removing the part thus resulting in "BillboardGui is not a valid member of part". How do I go about this?

0
replace while wait() do with a while booleanValue do, create a function on the module that turns that booleanValue to false, call the function, loop ends :) Vulkarin 581 — 5y
0
Thank yu! Marmalados 193 — 5y

Answer this question