Try it in your browserpreview Source

WaitRoblox✎

Yields this thread for at least that long, and gives back how long it actually took. The global `wait()` is deprecated; this is its replacement.

Pending review

Wait⏳Elapsed1Seconds
  • needs the Roblox engine — its datatypes, its DataModel or its scheduler
  • latent — it yields, and is never inlined
  • names its result — Result name in the Inspector is the local it binds, and a Declare Local reading that result makes a second one: see Variables and locals

Inputs

  • in:execution
  • Seconds:number= 1

Outputs

  • then:execution
  • Elapsed:number

What it compiles to

luau
task.wait(1)

Not reviewed yet