Appearance
K.Timer
Functions
K.Timer.Define
lua
K.Timer.Define(name: string, options: { Duration: number?, Shared: boolean?, Saved: boolean? }?): TimerK.Timer(name, options?) is the same as K.Timer.Define(name, options?).
K.Timer.Get
lua
K.Timer.Get(name: string): TimerK.Timer.Exists
lua
K.Timer.Exists(name: string): booleanMethods on timer
timer:TimeLeft
lua
timer:TimeLeft(player: Player?): numberSeconds left (0 when it isn't running). Clients: your own, or TimeLeft(otherPlayer).
timer:IsRunning
lua
timer:IsRunning(player: Player?): booleantimer:IsReady
lua
timer:IsReady(player: Player?): booleanTrue when the timer isn't running, e.g. a cooldown that has passed.
timer:Start
lua
timer:Start(...: any)Server: starts (or restarts) the timer for seconds, or its Duration.
timer:Add
lua
timer:Add(...: any)Server: adds time; starts the timer if it isn't running.
timer:Stop
lua
timer:Stop(player: Player?)Server: ends the timer now, without OnFinished.
timer:OnFinished
lua
timer:OnFinished(callback: (Player?) -> ())Server: callback(player) when a timer runs out (callback() for shared timers).
Generated from
src/Corode/Timer.luau.
