How would I make 2 lines run at once in a script?
✓ ANSWER ACCEPTED
How would I make 2 lines run at once in a script?
1 answer
✓ Accepted answer
Look up coroutines. I don't know about single lines, but you can run several bits of code at the same time in the same script this way.
coroutine.resume(coroutine.create(
function()
while wait() do
print("hey")
end
end
))
coroutine.resume(coroutine.create(
function()
while wait() do
print("hi")
end
end
))
while wait() do
print("what's up")
end
1 comment
0
Interesting, I will look that up.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Not sure if this is possible, 1st, why would you need to do this? 2nd, using no waits make it un-noticeably fast doing what your code directs.
Is there something in particular you're trying to accomplish by running 2 lines at once?
No, I was just wondering if it was possible.