For the complete documentation index, see llms.txt. This page is also available as Markdown.

setTimeout

setTimeout is just LUA native delay expect it does not yield the current running thread

setTimeout takes 2 arguments, the function and numeric timeout in seconds

local Age = 18
print("You are " .. Age .. " years old!")
setTimeout(function()
    Age = 23
    print("You are now " .. Age .. " years old!")
end, 5)
print("You are still " .. Age .. " years old!")

Last updated