API:Class/Attachment

Note:This object can only be parented to a Object Icon.pngBasePart
No Children Modifiers: Some of the Instance members on this class page have been hidden, because this class should not need to modify or handle children. You can still use those members, but it is not recommended.

ExplorerImageIndex81.pngAttachment : Object Icon.pngInstance

An Attachment is a special class used by constraint based objects. It represents an offset relative to the object it is parented to, in both its Position and Orientation properties.

The Position/Orientation properties of this object correspond with the object's CFrame property, which are then outputted in real time to the WorldPosition and WorldOrientation properties.

Properties

PropertiesmemberhiddenProperties [toggle]

Vector3Axis

Represents the direction of the X-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.

|RMD member="API:Class/Attachment/Axis"|Represents the direction of the X-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.|/RMD|
CFrameCFrame

Represents the CFrame offset of the Attachment.

|RMD member="API:Class/Attachment/CFrame"|Represents the CFrame offset of the Attachment.|/RMD|
Vector3Orientation

A Vector3 that describes the orientation of the Attachment relative to the orientation of its parent, in degrees. Rotations are applied in Z, X, Y order.

|RMD member="API:Class/Attachment/Orientation"|A Vector3 that describes the orientation of the Attachment relative to the orientation of its parent, in degrees. Rotations are applied in Z, X, Y order.|/RMD|
Vector3Position

A Vector3 that describes the positional offset of the Attachment, relative to the position and orientation of its parent.

|RMD member="API:Class/Attachment/Position"|A Vector3 that describes the positional offset of the Attachment, relative to the position and orientation of its parent.|/RMD|
Vector3Rotation

A Vector3 that describes the rotation of the Attachment relative to the rotation of its parent, in degrees. Rotations are applied in Z, Y, X order.

|RMD member="API:Class/Attachment/Rotation"|A Vector3 that describes the rotation of the Attachment relative to the rotation of its parent, in degrees. Rotations are applied in Z, Y, X order.|/RMD|
Vector3SecondaryAxis

Represents the direction of the Y-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.

|RMD member="API:Class/Attachment/SecondaryAxis"|Represents the direction of the Y-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.|/RMD|
boolVisible

Toggles the visibility of the Attachment in-game.

|RMD member="API:Class/Attachment/Visible"|Toggles the visibility of the Attachment in-game.|/RMD|
Vector3WorldAxis [readonly]

Represents the direction of the Attachment's X-Axis relative to the world, as a unit Vector3 with a length of 1.

|RMD member="API:Class/Attachment/WorldAxis"|Represents the direction of the Attachment's X-Axis relative to the world, as a unit Vector3 with a length of 1.|/RMD|
Vector3WorldOrientation [readonly]

Describes the orientation (in degrees) of the attachment relative to the world, rather than the parent of the Attachment. Rotations are described in Z, X, Y order.

|RMD member="API:Class/Attachment/WorldOrientation"|Describes the orientation (in degrees) of the attachment relative to the world, rather than the parent of the Attachment.

Rotations are described in Z, X, Y order.|/RMD|

Vector3WorldPosition [readonly]

Describes the position of the attachment relative to the world, rather than the parent of the Attachment.

|RMD member="API:Class/Attachment/WorldPosition"|Describes the position of the attachment relative to the world, rather than the parent of the Attachment.|/RMD|
Vector3WorldSecondaryAxis [readonly]

Represents the direction of the Y-Axis of the Attachment, relative to the world, as a unit Vector3 with a length of 1.

|RMD member="API:Class/Attachment/WorldSecondaryAxis"|Represents the direction of the Y-Axis of the Attachment, relative to the world, as a unit Vector3 with a length of 1.|/RMD|
Vector3WorldRotation [deprecated] [readonly]

Deprecated in favor of WorldOrientation.

|RMD member="API:Class/Attachment/WorldRotation"|Deprecated in favor of WorldOrientation.|/RMD|
Represents the direction of the X-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.
Represents the CFrame offset of the Attachment.
A Vector3 that describes the orientation of the Attachment relative to the orientation of its parent, in degrees. Rotations are applied in Z, X, Y order.
A Vector3 that describes the positional offset of the Attachment, relative to the position and orientation of its parent.
A Vector3 that describes the rotation of the Attachment relative to the rotation of its parent, in degrees. Rotations are applied in Z, Y, X order.
Represents the direction of the Y-Axis, relative to the Attachment's Rotation, as a unit Vector3 with a length of 1.
Toggles the visibility of the Attachment in-game.
WorldAxis [readonly]
Represents the direction of the Attachment's X-Axis relative to the world, as a unit Vector3 with a length of 1.
WorldOrientation [readonly]
Describes the orientation (in degrees) of the attachment relative to the world, rather than the parent of the Attachment. Rotations are described in Z, X, Y order.
WorldPosition [readonly]
Describes the position of the attachment relative to the world, rather than the parent of the Attachment.
Represents the direction of the Y-Axis of the Attachment, relative to the world, as a unit Vector3 with a length of 1.
WorldRotation [deprecated] [readonly]
Deprecated in favor of WorldOrientation.
Inherited from Object Icon.pngInstance:
boolArchivable

Determines if an object can be Clone or saved to file.

|RMD member="API:Class/Instance/Archivable"|Determines if an object can be Clone or saved to file.|/RMD|
stringClassName [readonly]

The unique name of this type of Instance.

|RMD member="API:Class/Instance/ClassName"|The unique name of this type of Instance.|/RMD|
stringName

A non-unique identifier for the object.

|RMD member="API:Class/Instance/Name"|A non-unique identifier for the object.|/RMD|
Ref<Instance>Parent

The hierarchical parent of the object.

|RMD member="API:Class/Instance/Parent"|The hierarchical parent of the object.|/RMD|
intDataCost [LocalUserSecurity] [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/Instance/DataCost"|Deprecated. Do not use.|/RMD|
boolRobloxLocked [PluginSecurity]

If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.

|RMD member="API:Class/Instance/RobloxLocked"|If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.|/RMD|
boolarchivable [deprecated] [hidden]

Deprecated in favor of Archivable.

|RMD member="API:Class/Instance/archivable"|Deprecated in favor of Archivable.|/RMD|
stringclassName [deprecated] [readonly]

Deprecated in favor of ClassName.

|RMD member="API:Class/Instance/className"|Deprecated in favor of ClassName.|/RMD|
Determines if an object can be Clone or saved to file.
ClassName [readonly]
The unique name of this type of Instance.
A non-unique identifier for the object.
The hierarchical parent of the object.
DataCost [LocalUserSecurity] [deprecated] [readonly]
Deprecated. Do not use.
RobloxLocked [PluginSecurity]
If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.
archivable [deprecated] [hidden]
Deprecated in favor of Archivable.
className [deprecated] [readonly]
Deprecated in favor of ClassName.

Functions

FunctionsmemberhiddenFunctions [toggle]

Vector3GetAxis ( )

Returns the value of the Attachment's Axis.

|RMD member="API:Class/Attachment/GetAxis"|Returns the value of the Attachment's Axis.|/RMD|
Vector3GetSecondaryAxis ( )

Returns the value of the Attachment's SecondaryAxis.

|RMD member="API:Class/Attachment/GetSecondaryAxis"|Returns the value of the Attachment's SecondaryAxis.|/RMD|
voidSetAxis ( Vector3 axis )

Sets the value of the Attachment's Axis.

|RMD member="API:Class/Attachment/SetAxis"|Sets the value of the Attachment's Axis.|/RMD|
voidSetSecondaryAxis ( Vector3 axis )

Sets the value of the Attachment's SecondaryAxis.

|RMD member="API:Class/Attachment/SetSecondaryAxis"|Sets the value of the Attachment's SecondaryAxis.|/RMD|
Returns the value of the Attachment's Axis.
Returns the value of the Attachment's SecondaryAxis.
SetAxis ( Vector3 axis )
Sets the value of the Attachment's Axis.
Sets the value of the Attachment's SecondaryAxis.
Inherited from Object Icon.pngInstance:
Ref<Instance>Clone ( )

Returns a copy of the object, including descendants, but only if the object is Archivable.

|RMD member="API:Class/Instance/Clone"|Returns a copy of the object, including descendants, but only if the object is Archivable.|/RMD|
voidDestroy ( )

Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.

|RMD member="API:Class/Instance/Destroy"|Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.|/RMD|
Ref<Instance>FindFirstAncestor ( string name )

Returns the first ancestor whose Name is equal to name, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestor"|Returns the first ancestor whose Name is equal to name, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstAncestorOfClass ( string className )

Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestorOfClass"|Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstAncestorWhichIsA ( string className )

Returns the first ancestor that inherits the class className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestorWhichIsA"|Returns the first ancestor that inherits the class className, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstChildOfClass ( string className )

Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.

|RMD member="API:Class/Instance/FindFirstChildOfClass"|Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.|/RMD|
Ref<Instance>FindFirstChildWhichIsA ( string className, bool recursive = false )

Returns the first child that inherits the class className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstChildWhichIsA"|Returns the first child that inherits the class className, or nil if none can be found.|/RMD|
array<Instance>GetDescendants ( )

Returns an array containing all of the descendants of the instance.

|RMD member="API:Class/Instance/GetDescendants"|Returns an array containing all of the descendants of the instance.|/RMD|
stringGetFullName ( )

Returns a string which shows the object's ancestry chain.

|RMD member="API:Class/Instance/GetFullName"|Returns a string which shows the object's ancestry chain.|/RMD|
RBXScriptSignalGetPropertyChangedSignal ( string property )

Returns a signal that is fired when the specified property is changed on this object.

|RMD member="API:Class/Instance/GetPropertyChangedSignal"|Returns a signal that is fired when the specified property is changed on this object.|/RMD|
boolIsA ( string className )

Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.

|RMD member="API:Class/Instance/IsA"|Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.|/RMD|
boolIsDescendantOf ( Instance ancestor )

Returns true if the object is a descendant of the given ancestor.

|RMD member="API:Class/Instance/IsDescendantOf"|Returns true if the object is a descendant of the given ancestor.|/RMD|
stringGetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]

Returns a coded string of the object's DebugId used internally by Roblox.

|RMD member="API:Class/Instance/GetDebugId"|Returns a coded string of the object's DebugId used internally by Roblox.|/RMD|
voidRemove ( ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Instance/Remove"|Deprecated. Do not use.|/RMD|
Instanceclone ( ) [deprecated]

Deprecated in favor of Clone.

|RMD member="API:Class/Instance/clone"|Deprecated in favor of Clone.|/RMD|
voiddestroy ( ) [deprecated]

Deprecated in favor of Destroy.

|RMD member="API:Class/Instance/destroy"|Deprecated in favor of Destroy.|/RMD|
boolisA ( string className ) [deprecated]

Deprecated in favor of IsA.

|RMD member="API:Class/Instance/isA"|Deprecated in favor of IsA.|/RMD|
boolisDescendantOf ( Instance ancestor ) [deprecated]

Deprecated in favor of IsDescendantOf.

|RMD member="API:Class/Instance/isDescendantOf"|Deprecated in favor of IsDescendantOf.|/RMD|
voidremove ( ) [deprecated]

Deprecated in favor of Remove.

|RMD member="API:Class/Instance/remove"|Deprecated in favor of Remove.|/RMD|
Clone ( )
Returns a copy of the object, including descendants, but only if the object is Archivable.
Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.
Returns the first ancestor whose Name is equal to name, or nil if none can be found.
Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.
Returns the first ancestor that inherits the class className, or nil if none can be found.
Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.
FindFirstChildWhichIsA ( string className, bool recursive = false )
Returns the first child that inherits the class className, or nil if none can be found.
Returns an array containing all of the descendants of the instance.
Returns a string which shows the object's ancestry chain.
Returns a signal that is fired when the specified property is changed on this object.
IsA ( string className )
Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.
Returns true if the object is a descendant of the given ancestor.
GetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]
Returns a coded string of the object's DebugId used internally by Roblox.
Remove ( ) [deprecated]
Deprecated. Do not use.
clone ( ) [deprecated]
Deprecated in favor of Clone.
destroy ( ) [deprecated]
Deprecated in favor of Destroy.
isA ( string className ) [deprecated]
Deprecated in favor of IsA.
isDescendantOf ( Instance ancestor ) [deprecated]
Deprecated in favor of IsDescendantOf.
remove ( ) [deprecated]
Deprecated in favor of Remove.


Events

Events [toggle]

Inherited from Object Icon.pngInstance:
AncestryChanged ( Instance child, Instance parent )

Fires when the Parent property of the object or one of its ancestors is changed.

|RMD member="API:Class/Instance/AncestryChanged"|Fires when the Parent property of the object or one of its ancestors is changed.|/RMD|
Changed ( string property )

Fires after a property of the object changes.

|RMD member="API:Class/Instance/Changed"|Fires after a property of the object changes.|/RMD|
Fires when the Parent property of the object or one of its ancestors is changed.
Changed ( string property )
Fires after a property of the object changes.

|RMD member="API:Class/Attachment"|An Attachment is a special class used by constraint based objects. It represents an offset relative to the object it is parented to, in both its Position and Orientation properties. The Position/Orientation properties of this object correspond with the object's CFrame property, which are then outputted in real time to the WorldPosition and WorldOrientation properties. |/RMD|