What is the fastest wait function?

This is true, but be aware that too many operations in one frame can be a problem if you’re not handling it correctly.

But to answer your question directly, it kind of depends. task.wait() is the same as RenderStepped.Heartbeat:Wait(). Heartbeat runs every physics frame (which is 60 fps) after physics have been calculated. RunService has multiple other options for example when you want to jump in. Such as before a physics frame.

Here’s a list from RunService:

Technically the fastest delay would be RenderStepped as this is the FPS you’re probably thinking of. It’s only client-side, but it happens prior to every render frame. This will be faster as it matches with FPS even if the user is using an FPS unlocker (going above 60 fps). But it’s important to note that that this should only be used for render-specific things and can cause issues if not handled correctly. For the majority of cases, you should just use task.wait().

4 Likes