xXLiLxJXx
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 687 |
|
|
| 19 Jun 2014 10:20 PM |
Is there a way to do this?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jun 2014 10:23 PM |
function loop() while true do print("Hello, world.") wait(5) end end local thread = coroutine.create(loop) coroutine.resume(thread) print("Hello, thread.")
Coroutines are multi-threaded, meaning they run independently from your script. Basically, it's like having a script inside of your script. However, be warned: if the coroutine errors, it doesn't print the error to the output window. |
|
|
| Report Abuse |
|
|
xXLiLxJXx
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 687 |
|
|
| 19 Jun 2014 10:27 PM |
| Holy.. Thank you for explaining that to me! That will be epically useful 0-0 |
|
|
| Report Abuse |
|
|
| |
|