How do I do a wait() / delay() .. (LUA)
Roblox had this thing called "wait()" where you can make a wait before the script moves on, but I noticed that there is no wait() on repl.it, it is set to lua, so i don't know, is there something I can use to delay a code?
Antelear
you can just..
local wait = require("socket").sleep wait(1) print("")
but for some reason it doesn't work for me anymore, so might have to find out why it might not work for you too. but yeah, hope this helps
RYANTADIPARTHI
Maybe try this:
function sleep(n) os.execute("sleep " .. tonumber(n)) end
here's a link for more info:
https://stackoverflow.com/questions/17987618/how-to-add-a-sleep-or-wait-to-my-lua-script
kittymanandcat
@RYANTADIPARTHI
I will try it!
Here
@InvisibleOne
Thank you, and I learned that I can make a working time thing by:
while true do
script.Parent.Text = "The date is: "..os.date()
wait(0.1)
end