Skip to content

Door

Slides the part or model it’s in open and shut again: on touch, when someone’s near, or when set off.

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

Slides the part or model it’s in open and shut again: on touch, when someone comes near, or when it’s set off (a Trigger, a script). It can ask for a stat first (a key, enough coins).

Type: 'touch' | 'near' | 'trigger' · Default: 'touch' · Access: read/write · Replicates: no

What opens it: a touch, someone within 8 studs, or only being set off (a Trigger, a script).

Type: Vector3 · Default: new Vector3(0, 8, 0) · Access: read/write · Replicates: no

How far it slides to open, in studs (2D games ignore z).

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

Seconds it takes to open, or to close.

Type: number · Default: 3 · Range: 0 to 3,600 (clamped) · Access: read/write · Replicates: no

Seconds it stays open before closing (near: after the last player leaves).

Type: string · Default: '' · Access: read/write · Replicates: no

A stat players need to open it, like Keys or Coins (‘’ = anyone may).

Type: number · Default: 0 · Access: read/write · Replicates: no

How much of requiresStat they need.

Type: number · Access: read-only

How open it is, from 0 (shut) to 1 (open).

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