Instance

Inherits: <<<ROOT>>>

Tags: NotBrowsable, NotCreatable

No description available.

Properties

Determines whether or not an Instance can be saved when the game closes/attempts to save the game. Note: this only applies to games that use Data Persistence, or SavePlaceAsync.

ClassName: string

The string name of this Instance's most derived class.

No description available.

Name: string

No description available.

The Instance that is directly above this Instance in the tree.

No description available.

archivable is deprecated. Use Archivable instead.

className: string

className is deprecated. Use ClassName instead.

Functions

Removes all children (but not this object) from the workspace.

Returns a copy of this Object and all its children. The copy's Parent is nil

Destroy() => void

Removes object and all of its children from the workspace. Disconnects object and all children from open connections. Object and children may not be usable after calling Destroy.

FindFirstAncestor(
name: string
) => Instance

Returns the first ancestor of this Instance that matches the first argument 'name'. The function will return nil if no Instance is found.

FindFirstAncestorOfClass(
className: string
) => Instance

Returns the first ancestor of this Instance with a ClassName equal to 'className'. The function will return nil if no Instance is found.

FindFirstAncestorWhichIsA(
className: string
) => Instance

Returns the first ancestor of this Instance that :IsA(className). The function will return nil if no Instance is found.

FindFirstChild(
name: string,
recursive: bool
) => Instance

Returns the first child of this Instance that matches the first argument 'name'. The second argument 'recursive' is an optional boolean (defaults to false) that will force the call to traverse down thru all of this Instance's descendants until it finds an object with a name that matches the 'name' argument. The function will return nil if no Instance is found.

FindFirstChildOfClass(
className: string
) => Instance

Returns the first child of this Instance that with a ClassName equal to 'className'. The function will return nil if no Instance is found.

FindFirstChildWhichIsA(
className: string,
recursive: bool
) => Instance

Returns the first child of this Instance that :IsA(className). The second argument 'recursive' is an optional boolean (defaults to false) that will force the call to traverse down thru all of this Instance's descendants until it finds an object with a name that matches the 'className' argument. The function will return nil if no Instance is found.

GetAttribute(
attribute: string
) => Variant

No description available.

GetAttributeChangedSignal(
attribute: string
) => RBXScriptSignal

No description available.

GetAttributes() => Dictionary

No description available.

GetChildren() => Objects

Returns a read-only table of this Object's children

GetDebugId(
scopeLength: int
) => string

This function is for internal testing. Don't use in production code

GetDescendants() => Array

Returns an array containing all of the descendants of the instance. Returns in preorder traversal, or in other words, where the parents come before their children, depth first.

GetFullName() => string

Returns a string that shows the path from the root node (DataModel) to this Instance. This string does not include the root node (DataModel).

GetPropertyChangedSignal(
property: string
) => RBXScriptSignal

No description available.

IsA(
className: string
) => bool

Returns a boolean if this Instance is of type 'className' or a is a subclass of type 'className'. If 'className' is not a valid class type in ROBLOX, this function will always return false. More info

IsAncestorOf(
descendant: Instance
) => bool

No description available.

IsDescendantOf(
ancestor: Instance
) => bool

No description available.

Remove() => void

Deprecated. Use ClearAllChildren() to get rid of all child objects, or Destroy() to invalidate this object and its descendants

SetAttribute(
attribute: string,
value: Variant
) => void

No description available.

WaitForChild(
childName: string,
timeOut: double
) => Instance

No description available.

children() => Objects

Use GetChildren() instead

clone is deprecated. Use Clone instead.

destroy() => void

destroy is deprecated. Use Destroy instead.

findFirstChild(
name: string,
recursive: bool
) => Instance

findFirstChild is deprecated. Use FindFirstChild instead.

getChildren() => Objects

getChildren is deprecated. Use GetChildren instead.

isA(
className: string
) => bool

isA is deprecated. Use IsA instead.

isDescendantOf(
ancestor: Instance
) => bool

isDescendantOf is deprecated. Use IsDescendantOf instead.

remove() => void

remove is deprecated. Use Remove instead.

Events
AncestryChanged: RBXScriptSignal(
child: Instance,
parent: Instance
)

Fired when any of this object's ancestors change. First argument 'child' is the object whose parent changed. Second argument 'parent' is the first argument's new parent.

AttributeChanged: RBXScriptSignal(
attribute: string
)

No description available.

Changed: RBXScriptSignal(
property: string
)

Fired after a property changes value. The property argument is the name of the property

ChildAdded: RBXScriptSignal(
child: Instance
)

No description available.

ChildRemoved: RBXScriptSignal(
child: Instance
)

No description available.

DescendantAdded: RBXScriptSignal(
descendant: Instance
)

Fired after an Instance is parented to this object, or any of this object's descendants. The 'descendant' argument is the Instance that is being added.

DescendantRemoving: RBXScriptSignal(
descendant: Instance
)

Fired after an Instance is unparented from this object, or any of this object's descendants. The 'descendant' argument is the Instance that is being added.

childAdded: RBXScriptSignal(
child: Instance
)

childAdded is deprecated. Use ChildAdded instead.