Guide 1 Docs 2 Reference 3

Function of time

time.on_tick

Calls fn every tick, 20 times a second, with the tick number; keep it short.

time.on_tick(fn: (tick: number) -> ()) → Connection

Parameters

fn(tick: number) -> ()required

Returns

Connection

Used in