wait

wait(timeSeconds: number): number, number

Yields the current thread until the specified amount of seconds have elapsed. The delay will have a minimum duration of 29 milliseconds, but this minimum may be higher depending on the target framerate and various throttling conditions. If the seconds parameter is not specified, the minimum duration will be used. This function returns:

Actual time yielded (in seconds) Total time since the software was initialized (in seconds)

task.wait is usually preferable to wait

Last updated