function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
-- This is the wait function (mostly known from roblox)
-- It works exactly like the roblox version
-- It's used like this: wait(how many seconds)
wait(5) -- Waits 5 seconds then prints "Hello world!"
print("Hello world!")
function wait(n)
os.execute("sleep "..tostring(tonumber(n)))
end
-- the reason we're doing this is because lua
-- doesn't have a built in wait function
-- unless it's roblox lua or other types,
-- but this is for vanilla lua
local function Wait(s)
local c = os.time()
repeat until c >= c + s
end
wait(5)
Code Example |
---|
Lua :: roblox make rainbow part |
Lua :: roblox rainbow part |
Lua :: lua dump table |
Lua :: clickdetector player roblox |
Lua :: roblox lua random number |
Lua :: roblox make region |
Lua :: luau kill brick script |
Lua :: luau make debounce |
Lua :: roblox part tween |
Lua :: lua float to int |
Lua :: roblox random part color |
Lua :: lua printing |
Lua :: lua add 1 to a variable |
Lua :: json resume shema |
Lua :: what is lua used for |
Lua :: check if player owns gamepass |
Lua :: What is CanCollide in roblox? |
Lua :: copy table lua |
Lua :: Get Nearest Player fivem |
Lua :: What percentage of developers use Lua |
Lua :: lua catch error |
Matlab :: matlab measure time |
Matlab :: matlab label size |
Matlab :: cos in scilab |
Basic :: JWT EM VBNET |
Elixir :: elixir try rescue |
Elixir :: phoenix ecto query expression |
Scala :: scala string to boolean |
Scala :: currying scala |
Excel :: excel conditionally highlight rows based on column |