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

Wait or Delay? / Delay or Wait?

Just an ordinary question. Would you rather prefer or is there a better performance boost for using either delay or wait?

print("Yay") wait(10) print("Done")

or

print("Yay") delay(10,function() print("Done") end)

3 comments

1

Use wait()....

0

I use wait(), never used delay and never plan on it

0

Delay is better, for special reasons, imagine a gun, if you use Wait() near the Blast line, it stops the whole script, but if you use delay, its much better.

1 answer

✓ Accepted answer

Not as far as I know, but:

Wait() stops the entire script for that time.

Delay() doesn't stop the script, it keeps going, even if x amount of seconds isn't up.

2 comments

1

What delay will do is put the function into a thread and have it run simultaneous to any other code that is beyond the delay function. Example: delay(5,function() print'hello' end) print'world' will result in world hello in the output with hello being delayed.

0

taht's waht I meant

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