How to do a Coroutine inside a function in lua?

Dose anyone know how to do a Coroutine in a function in lua. If someone could show me an example of how this is done I would be very thank full.

It has been a while since I’ve played around with Lua, but I suspect the answer will involve . . . tables. :stuck_out_tongue:

You may want to check documentation directly from Lua . . .

https://www.lua.org/pil/9.html

http://lua-users.org/wiki/CoroutinesTutorial

Good luck with your project! =)