Ask coding questions

← Back to all posts
What is the command for wait?
NEONLIMITS (0)

What is the command for wait?

Comments
hotnewtop
RishabhRanjit (6)

@NEONLIMITS There is none.
You can make your own using require()

-- Should be at top
socket = require("socket")

function sleep(sec)
    socket.select(nil, nil, sec)
end


--
sleep(5.2)

You can then turn the code to

socket = require("socket")

function sleep(sec)
socket.select(nil, nil, sec)
end

while true do
wait(1)
end

RishabhRanjit (6)

@NEONLIMITS

I meant

socket = require("socket")

function sleep(sec)
socket.select(nil, nil, sec)
end

while true do
sleep(1)
end