Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Wait code line?

I kept looking online for a like a wait, or loading code. Like waiting for something to come: Ex- Give a cop your License and information and you need to wait for the ticket. When I coded it, once you give the info, you get the ticket exactly that sec. Anyone could give me a code line that operates by seconds?

1 answer

Well, I don't understand the question.

Lua operates at such a speed that lines of code are executed almost instantly. Loading is 99% just for show. But if you want to force the script to wait then you would use

wait()

wait() has 1 parameter which is an interval value in seconds which means a number it's used effectively in this way

print("Hi, Let me pause the script for a second")
wait(1) -- pauses the script for 1 second
print("Okay, thanks the seconds up")

1 comment

0

The session just stops and doesn't gon when I use wait(1)

This discussion is preserved as it was. New answers, comments, and votes are closed.