How long does wait() wait for?

How long does wait() wait for?

5 Likes

A horrendously inconsistent amount of time.

If you want to check the average wait time in your game accounting for the lowest lag possible, use print(wait()) in the command bar.

15 Likes

it’s supposed to be 1/30 of a second, but can be a bit longer depending on certain conditions

6 Likes

IIRC it’s a minumum of 0.02999, but as @Imp_erator said, it’s not always exactly that amount of time. You can verify that number in studio settings.

1 Like

0 is actually the technical minimum, you can adjust the default wait time through the Lua settings in studio.

1 Like

I know, I meant that 0.0299 was the default number in the settings and that was the shortest number it could wait (you cant do wait(0.000001))

You should look at the post below for more information to make your wait() more accurate.

1 Like

It yields for how many seconds you tell it to wait for - the extra delay is for it to wait for an empty slot and resume the Lua thread through the queued resume task.

2 Likes