Search
 
SCRIPT & CODE EXAMPLE
 

LUA

wait function lua

function wait(seconds)
    local start = os.time()
    repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
Comment

wait function rebuilt in lua

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)
Comment

wait() in lua

wait(5)  -- Waits 5 seconds then prints "Hello world!"
print("Hello world!")
Comment

lua wait function

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
Comment

Wait function lua

local function Wait(s)
  local c = os.time()
  
  repeat until c >= c + s
 end
Comment

lua wait function

wait(5)
Comment

PREVIOUS NEXT
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 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =