Yuari
Documentation
Docs/task library/task.wait

task.wait

Yields for seconds (default 0.03).

Syntax

task.wait(seconds?: number) -> any

Parameters

ParameterTypeDescription
seconds?numberA duration in seconds.

Returns

TypeDescription
anyYields

Description

task.wait is part of the task library library. The task library runs on the VM's own scheduler; waits and delayed callbacks resume when the VM next ticks.

The calling thread yields as needed and resumes on the module scheduler when the operation completes.

Example

task.wait(0.5)

Notes

  • Waits and delayed callbacks resume on the VM's scheduler.