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?
COMMUNITY QUESTION
How do you destroy a loop within a module script?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
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 :)
Thank yu!