Skip to content

Trigger

A button: touching the part it’s in sets off, turns on, turns off or toggles behaviors elsewhere.

  • Inherits: Behavior → Instance
  • Creatable: Yes: new Trigger(), or Instance.new('Trigger', parent).
  • Replication: Server only: it, and everything inside it, is never sent to clients.

A button: touching the part it’s in sets off, turns on, turns off or toggles behaviors.

Type: Instance | null · Default: null · Access: read/write · Replicates: no

What it acts on: a behavior, or a part, model or folder; then every behavior inside it.

Type: 'activate' | 'enable' | 'disable' | 'toggle' · Default: 'activate' · Access: read/write · Replicates: no

activate sets them off (a Door opens, a Spawner makes a copy); enable, disable and toggle turn them on and off.

Type: number · Default: 1 · Range: 0 to 60 (clamped) · Access: read/write · Replicates: no

Seconds before the same player can set it off again.

Inherited from Behavior: enabled, running

Inherited from Instance: name, archivable, id, className, parent, destroyed

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

Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged