I currently only know of two ways, a third I'm unfamiliar with which I'm not sure would work. What's the most efficient way of repeating something over again, for example let's say you have a repeating game that has to call on a function/s that set up the game for people play. Is there another way that I've yet to find, (likely).
One:
while true do --code wait(--[[whatever time is set]]) end
Second:
--Currently using this below, over the while true do ... end function a() wait(1) a() end
Third: I'm not very familiar with these but coroutine's are these a viable way of setting a loop or something that must be called again and again?
The second method is called recursion. Recursion shouldn't be used for simply repeating yourself.
Recursion has some overhead. The overhead is reduced if you use tail calls
There is no "lag" associated with any kind of iteration.
The while
loop is the most readable and typical. Use that.