Skip to content

Instantly share code, notes, and snippets.

@SethDusek
Created November 20, 2014 13:54
Show Gist options
  • Save SethDusek/94639649487f91440379 to your computer and use it in GitHub Desktop.
Save SethDusek/94639649487f91440379 to your computer and use it in GitHub Desktop.
--sorry but this was done in the command bar so no spaces
function fun() for i = 1,40 do if yield==true then coroutine.yield() end print(i) wait(1) end end
fun = coroutine.wrap(fun)
fun()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment