Instance is the base class for all classes in the Roblox class hierarchy which can be part of the DataModel tree.- Memory category
- Instances
- Own members
- 69
- Inherited members
- 6
- Subclasses
- 608
- Siblings
- 30
Properties23
Defined byInstance21
Property categoryBehavior
Instance.Archivable: boolean Determines if anInstanceand its descendants can be cloned usingInstance:Clone(), and can be saved/published.Instance.archivable: boolean Deprecated: This deprecated property is a variant ofInstance.Archivablewhich should be used instead.Use Archivable instead.
Property categoryData
Instance.Attributes: string Instance.AttributesReplicate: string Instance.AttributesSerialize: string Instance.HistoryId: UniqueId Instance.Name: string A non-unique identifier of theInstance.Instance.Parent: Instance Determines the hierarchical parent of theInstance.Instance.PredictionMode: Enum.PredictionMode Reflects the client-side prediction mode applied to the instance under server-authoritative physics.Instance.PropertyStatusStudio: Enum.PropertyStatus Instance.RobloxLocked: boolean A deprecated property that used to protectCoreGuiobjects.Instance.SerializedOverrides: string Instance.SourceAssetId: number Instance.Tags: SharedString Instance.UniqueId: UniqueId A unique identifier for the instance.Instance.numExpectedDirectChildren: number Instance.DataCost: number
Property categoryPermissions
Instance.Capabilities: SecurityCapabilities The set of capabilities allowed to be used for scripts inside this container.Instance.DefinesCapabilities: boolean Instance.IsInSandbox: boolean Indicates whether the instance is inside a sandboxed container.Instance.Sandboxed: boolean When enabled, the instance can only access abilities in itsCapabilitieslist.
No properties match the filters.
Methods42
Object:GetPropertyChangedSignal( property: string): RBXScriptSignal Get an event that fires when a given property of the object changes.Parameters Parameter Description property: stringThe property to connect to.Returns Type Description RBXScriptSignalA signal that fires whenever the property changes.- Returns true if an object's class matches or inherits from a given class.
Parameters Parameter Description className: stringThe class against which the Object's class will be checked. Case-sensitive.Returns Type Description booleanDescribes whether the Object's class matched or is a subclass of the given class. - Deprecated: This deprecated function is a variant of
Object:IsA()which should be used instead.Parameters Parameter className: stringReturns Type booleanUse IsA instead.
Defined byInstance39
Instance:AddTag( tag: string) Applies a tag to the instance.Parameters Parameter Description tag: stringThe tag to apply to the instance.- This method destroys all of an instance's children.
Instance:Clone( ): Instance Create a copy of an instance and all its descendants, ignoring instances that are notArchivable.Returns Type Description InstanceA copy of the instance, ornilif the instance is notArchivable.- Sets the
Instance.Parentproperty tonil, locks theInstance.Parentproperty, disconnects all connections, and callsDestroy()on all children. - Returns the first ancestor of the
InstancewhoseInstance.Nameis equal to the given name.Parameters Parameter Description name: stringTheInstance.Nameto be looked for. - Returns the first ancestor of the
InstancewhoseObject.ClassNameis equal to the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be looked for. - Returns the first ancestor of the
Instancefor whomObject:IsA()returns true for the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be looked for. - Returns the first child of the
Instancefound with the given name.Parameters Parameter Description name: stringTheInstance.Nameto be searched for.recursive: boolean? = falseWhether or not the search should be conducted recursively. Parameters Parameter Description className: stringTheObject.ClassNameto be looked for.- Returns the first child of the
Instancefor whomObject:IsA()returns true for the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be searched for.recursive: boolean? = falseWhether or not the search should be conducted recursively. - Returns the first descendant found with the given
Instance.Name.Parameters Parameter Description name: stringTheInstance.Nameto search for. Instance:GetActor( ): Actor Returns theActorassociated with the Instance, if any.- Returns the value which has been assigned to the given attribute name.
Parameters Parameter Description attribute: stringThe name of the attribute being retrieved.Returns Type Description anyThe value which has been assigned to the given attribute name. If no attribute has been assigned,nilis returned. Instance:GetAttributeChangedSignal( attribute: string): RBXScriptSignal Returns an event that fires when the given attribute changes.Parameters Parameter Description attribute: stringThe name of the specified attribute for which the change signal is being returned.Returns Type Description RBXScriptSignalAn event that fires when the given attribute changes.Instance:GetAttributes( ): { [string]: any } Returns a dictionary of the instance's attributes.Returns Type Description { [string]: any }A dictionary of string → variant pairs for each attribute where the string is the name of the attribute and the variant is a non-nil value.Instance:GetChildren( ): { Instance } Returns an array containing all of the instance's children.Returns Type Description { Instance }An array containing the instance's children.- Returns a coded string of the debug ID used internally by Roblox.
Parameters Parameter Description scopeLength: number? = 4The scope length.Returns Type Description stringThe Debug ID string. Instance:GetDescendants( ): { Instance } Returns an array containing all of the descendants of the instance.Returns Type Description { Instance }An array containing the instance's descendants.Instance:GetFullName( ): string Returns a string describing the instance's ancestry.- Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Parameters Parameter Description name: stringName of the property to query.selector: string?Optional selector for the pseudo instance you are targeting on the instance.Returns Type Description anyThe styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. Instance:GetStyledPropertyChangedSignal( property: string): RBXScriptSignal Returns an event that fires when the given style property changes on the instance.Parameters Parameter Description property: stringName of the style property for which to listen for changes.Returns Type Description RBXScriptSignalEvent that fires when the given style property changes.Instance:GetTags( ): { any } Gets an array of all tags applied to the instance.Returns Type Description { any }An array of strings, each representing a tag applied to the instance.- Check whether the instance has a given tag.
Parameters Parameter Description tag: stringThe tag to check for on the instance.Returns Type Description booleantrueif the instance has the given tag,falseotherwise. - Returns true if an
Instanceis an ancestor of the given descendant. - Returns
trueif anInstanceis a descendant of the given ancestor. - Returns
trueif the value stored in the specified property is not equal to the code-instantiated default.Parameters Parameter Description property: stringName of the property to query.Returns Type Description booleanBoolean indicating whether the property is modified from its code‑instantiated default. Instance:QueryDescendants( selector: string): { Instance } Returns an array containing all descendants of the instance that match theselectorstring.Parameters Parameter Description selector: stringSelector string used to filter elements.Returns Type Description { Instance }An array of instances (empty if nothing matched the selector).Instance:RemoveTag( tag: string) Removes a tag from the instance.Parameters Parameter Description tag: stringThe tag to remove from the instance.Instance:ResetPropertyToDefault( property: string) Resets a property to its default value.Parameters Parameter Description property: stringName of the property to reset.- Sets the attribute with the given name to the given value.
- Returns the child of the
Instancewith the given name. If the child does not exist, it will yield the current thread until it does.Parameters Parameter Description childName: stringTheInstance.Nameto be looked for.timeOut: numberAn optional time out parameter. - Deprecated: This item is deprecated in favor of
Instance:Destroy()andInstance:ClearAllChildren(). If you must remove an object from the game, and wish to use the object later, set itsParentproperty tonilinstead of using this method.
Sets the object'sParenttonil, and does the same for all its descendants. Instance:children( ): { Instance } Deprecated: This item has been superseded byInstance:GetChildren()which should be used in all new work.
Returns an array of the object's children.Returns Type Description { Instance }Array of child objects/instances.Use GetChildren instead.
Instance:clone( ): Instance Deprecated: This deprecated function is a variant ofInstance:Clone()which should be used instead.Returns Type InstanceUse Clone instead.
- Deprecated: This deprecated function is a variant of
Instance:Destroy()which should be used instead.Use Destroy instead.
- Deprecated: This deprecated function is a variant of
Instance:FindFirstChild()which should be used instead.Returns Type InstanceUse FindFirstChild instead.
Instance:getChildren( ): { Instance } Deprecated: This deprecated function is a variant ofInstance:GetChildren()which should be used instead.Returns Type { Instance }Use GetChildren instead.
- Deprecated: This deprecated function is a variant of
Instance:IsDescendantOf()which should be used instead.Parameters Parameter ancestor: InstanceReturns Type booleanUse IsDescendantOf instead.
- Deprecated: This deprecated function is a variant of
Instance:Remove()which has also been deprecated. Neither function should be used in new work.Use Remove instead.
No methods match the filters.
Events10
Object.Changed: RBXScriptSignal<( property: string)> Fires immediately after a property of the object changes, with some limitations.Parameters Parameter property: string
Defined byInstance9
Instance.AncestryChanged: RBXScriptSignal<( child: Instance, parent: Instance)> Fires when theInstance.Parentproperty of this object or one of its ancestors is changed.Instance.AttributeChanged: RBXScriptSignal<( attribute: string)> Fires whenever an attribute is changed on theInstance.Parameters Parameter attribute: stringInstance.ChildAdded: RBXScriptSignal<( child: Instance)> Fires after an object is parented to thisInstance.Parameters Parameter child: InstanceInstance.ChildRemoved: RBXScriptSignal<( child: Instance)> Fires after a child is removed from thisInstance.Parameters Parameter child: InstanceInstance.DescendantAdded: RBXScriptSignal<( descendant: Instance)> Fires after a descendant is added to theInstance.Parameters Parameter descendant: InstanceInstance.DescendantRemoving: RBXScriptSignal<( descendant: Instance)> Fires immediately before a descendant of theInstanceis removed.Parameters Parameter descendant: InstanceInstance.Destroying: RBXScriptSignal<( )> Fires immediately before (or is deferred until after) the instance is destroyed viaInstance:Destroy().Instance.StyledPropertiesChanged: RBXScriptSignal<( )> Fires whenever any style property is changed on the instance, including when a property is set tonil.Instance.childAdded: RBXScriptSignal<( child: Instance)> Deprecated: This deprecated event is a variant ofInstance.ChildAddedwhich should be used instead.Parameters Parameter child: InstanceUse ChildAdded instead.
No events match the filters.