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

When a function is called with a wait() inside of it, does it stall the script or make a new thread?

Asked by 4 years ago

I have a short question and I need to get this answered so I can work on making a victory "stage" for my game, which then starts the round over again.

So I have two functions here, they perform basic tasks.

function Print()
    wait(2)
    print("Print function is doing this")
end

function Print2()
    Print()
    print("Print2 function is doing this")
end

There's only two ways the output could log this:

  1. By making a separate thread
"Print2 function is doing this" 
"Print function is doing this"
  1. Completely stalling the script
"Print function is doing this"
"Print2 function is doing this"

Thanks for viewing

Answer this question