RoundTimer
A countdown every player sees; at zero it shows a message and can start the round over.
- Inherits: Behavior → Instance
- Creatable: Yes:
new RoundTimer(), orInstance.new('RoundTimer', parent). - Replication: Server only: it, and everything inside it, is never sent to clients.
Properties
Section titled “Properties”duration
Section titled “duration”Type: number · Default: 60 · Range: 1 to 86,400 (clamped) · Access: read/write · Replicates: no
Seconds in a round.
Type: string · Default: 'Time left' · Access: read/write · Replicates: no
Shown before the time left.
Type: 'restart' | 'stop' · Default: 'restart' · Access: read/write · Replicates: no
At zero: restart (after 3 seconds everyone respawns and a new round starts) or stop (it stays at zero until set off again).
endMessage
Section titled “endMessage”Type: string · Default: 'Time's up!' · Access: read/write · Replicates: no
Shown to everyone when time runs out.
timeLeft
Section titled “timeLeft”Type: number · Default: 0 · Access: read-only · Replicates: no
Set by the engine: whole seconds left in this round (0 once it has ended).
Inherited from Behavior: enabled, running
Inherited from Instance: name, archivable, id, className, parent, destroyed
Methods
Section titled “Methods”Inherited from Behavior: activate
Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString
Events
Section titled “Events”Arguments: none
Fires when the countdown reaches zero.
Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged