Horje
wait function lua Code Example
wait function lua
function wait(seconds)
    local start = os.time()
    repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
wait() in lua
wait(5)  -- Waits 5 seconds then prints "Hello world!"
print("Hello world!")
wait function lua
--example of wait()

local number = 1
wait(number) --it will wait the varible number
local newnumber = number + number --result = 2
wait(newnumber) --can add numbers too
print("okay the script is over. i waited 3 sec") -- you can delete this
--wait is used to wait some seconds.

--you can do this too
wait(0.1)
wait(0.002938234)
wait(0.9999)
--the 3 numbers are now below 1 sec

--it works like this : wait(seconds)
how to wait in lua
wait() --parameter is seconds
how to wait lua
wait(1)
Wait function lua
local function Wait(s)
  local c = os.time()
  
  repeat until c >= c + s
 end




10

Related
print table lua Code Example print table lua Code Example
roblox go thru all players Code Example roblox go thru all players Code Example
lua not equal Code Example lua not equal Code Example
lua add table to value Code Example lua add table to value Code Example
lua in pairs Code Example lua in pairs Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9