Ask coding questions

← Back to all posts
How do I do a wait() / delay() .. (LUA)
kittymanandcat

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?

Answered by InvisibleOne [earned 5 cycles]
View Answer
Voters
kittymanandcat
Comments
hotnewtop
InvisibleOne

Here

kittymanandcat

@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

Opalmime

you can just..

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:

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!