New ThreadRoblox✎

Runs the Body on a thread of its own, written as the function it is: at once with task.spawn, once this frame's work is done with task.defer, or after some seconds with task.delay. Choose which in the Inspector. The thread comes back on Thread, to cancel.

Pending review

New Threadtask.spawnBodyThread
  • needs the Roblox engine — its datatypes, its DataModel or its scheduler

Inputs

  • in:execution

Outputs

  • then:execution
  • Body:execution
  • Thread:thread

What it compiles to

Script StartNew Threadtask.delayBody2SecondsThreadPrintTwo seco…Value
The graph this output was compiled from.
luau
task.delay(2, function()
	print("Two seconds later")
end)

Not reviewed yet