To elaborate... If I'm running a loop, does it just loop that code over and over without running any code I put below it? Sorry if this is obvious.
✓ ANSWER ACCEPTED
If a while loop is running, can the code under it run at the same time?
2 answers
✓ Accepted answer
The script loops the code over and over without running any code below it.
...Unless if you used a coroutine.
Typically it would loop infinitely, until you break it or until it reaches it's goal. You can run code while also running a loop by using coroutines:
coroutine.resume(coroutine.create(function()
while true do print("apple")
wait(0.1)
end
end))
print("I'm still running!")
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you!
You're welcome.