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(), orInstance.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).
Properties
Section titled “Properties”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).
offset
Section titled “offset”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).
openTime
Section titled “openTime”Type: number · Default: 0.5 · Range: 0 to 60 (clamped) · Access: read/write · Replicates: no
Seconds it takes to open, or to close.
stayOpen
Section titled “stayOpen”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).
requiresStat
Section titled “requiresStat”Type: string · Default: '' · Access: read/write · Replicates: no
A stat players need to open it, like Keys or Coins (‘’ = anyone may).
requiresAmount
Section titled “requiresAmount”Type: number · Default: 0 · Access: read/write · Replicates: no
How much of requiresStat they need.
openAmount
Section titled “openAmount”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
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”Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged