Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Attachment

Defines a point and orientation relative to a parent BasePart, Bone, or another Attachment.

Member index 18

HistoryMember
553Axis: Vector3
553CFrame: CFrame
553SecondaryAxis: Vector3
553Visible: bool
553WorldAxis: Vector3
553WorldCFrame: CFrame
553WorldSecondaryAxis: Vector3
553GetAxis(): Vector3
648GetConstraints(): Instances
553GetSecondaryAxis(): Vector3
573SetAxis(axis: Vector3): null
573SetSecondaryAxis(axis: Vector3): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

An Attachment defines a point and orientation relative to a parent BasePart, Bone, or another Attachment. The offset is stored in the CFrame property. The offset can also be set through other properties, such as WorldCFrame.

Attachments are used by several kinds of Constraints and are also valid alternatives to BasePart as a parent for objects such as:

  • ParticleEmitters which will emit particles from the attachment's specific position/orientation instead of the BasePart bounds.
  • Light-emitting objects like PointLight and SpotLight which will shine from the attachment's position/orientation instead of the BasePart center.
  • Sound which will use the attachment's position as the sound's focal point, instead of the BasePart center.

History 110

Members 18

Axis

TypeDefault
Vector31, 0, 0

Direction of the X axis of the attachment, represented as a unit Vector3.

This property is not replicated. Its interface does not cross the network boundary.

History 5

  • 553 Change Default of Axis from to Vector3(1, 0, 0)
  • 486 Change ThreadSafety of Axis from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Axis from to ReadOnly
  • 359 Change CanLoad of Axis from false to true
  • 241 Add Axis
Tags: [NotReplicated]

CFrame

TypeDefault
CFrame

The CFrame offset of the attachment. Changes to this property will reflect onto the Position and Rotation properties of this object. Similarly, a change to either of those properties will reflect onto this property.

History 5

GetAxis

Parameters (0)
No parameters.
Returns (1)
Vector3

Returns the value of the attachment's Axis.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work. Axis should be used instead.

History 4

Tags: [Deprecated]

GetConstraints

Parameters (0)
No parameters.
Returns (1)
Instances

Returns a list of Constraints connected to the attachment.

History 2

GetSecondaryAxis

Parameters (0)
No parameters.
Returns (1)
Vector3

Returns the value of the attachment's SecondaryAxis.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work. SecondaryAxis should be used instead.

History 4

Tags: [Deprecated]

SecondaryAxis

TypeDefault
Vector30, 1, 0

Direction of the Y axis of the attachment, represented as a unit Vector3.

This property is not replicated. Its interface does not cross the network boundary.

History 5

Tags: [NotReplicated]

SetAxis

Parameters (1)
axisVector3
Returns (1)
null

Sets the value of the attachment's Axis.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work. Axis should be used instead.

History 5

Tags: [Deprecated]

SetSecondaryAxis

Parameters (1)
axisVector3
Returns (1)
null

Sets the value of the attachment's SecondaryAxis.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work. SecondaryAxis should be used instead.

History 5

Tags: [Deprecated]

Visible

TypeDefault
boolfalse

Toggles the in-experience visibility of the attachment.

History 4

WorldAxis

TypeDefault
Vector31, 0, 0

Direction of the X axis of the attachment relative to the world, represented as a unit Vector3 with a length of 1.

This property is not replicated. Its interface does not cross the network boundary.

History 7

Tags: [NotReplicated]

WorldCFrame

TypeDefault
CFrame

The exact CFrame of the attachment in world space coordinates, independent of its parent. The value of this property is equivalent to multiplying the CFrame of the attachment's parent by its own CFrame.

This property is not replicated. Its interface does not cross the network boundary.

History 7

Tags: [NotReplicated]

WorldSecondaryAxis

TypeDefault
Vector30, 1, 0

Direction of the Y axis of the attachment relative to the world, represented as a unit Vector3 with a length of 1.

This property is not replicated. Its interface does not cross the network boundary.

History 7

Tags: [NotReplicated]

Settings