How to stop a local function from a local function?

Hello, I’m here to ask how to stop a local function from a local function. Here’s what I have so far.

What I am trying to accomplish is that when the StopShadowTrix value becomes set to false, it will stop the other local functions from running, kind of similar to returning a function but instead with a local function.

I’ve done research to see If I can find out how to accomplish this, but I haven’t come across anything. I don’t know if maybe this is not a possible and can be done a different way. I will appreciate the help.

1 Like

Well, the thing is, calling the function WITHOUT spawning / courotines will actually stop everything under the function until it finishes, just call the functions after each other and it will work, just make each of them wait until whatever you want should happen

Can’t you just do break() to end a function?