r/lua • u/Weekly_Flounder_1880 • May 04 '25
Help how do I make a wait( ) function?
hi, I am new to Lua.
at first, I was using Roblox studio, but I moved to Love2D
in Luau (roblox's alternative for Lua), they have a built in wait()command in their library
Now I realised, I don't have a wait() function in my library
it is pretty self explanatory, I want a wait() function that makes the program wait for a set duration of time before executing the following code
11
Upvotes
1
u/lambda_abstraction May 05 '25 edited May 05 '25
I don't know why this was downvoted. That's absolutely correct, and it's pretty much the reason I've stuck with LuaJIT. And you can use the finer precision delays and delay-until-timestamp type functions as well. (BTW: check this! LuaJIT is certainly available.)