Class · inherits Instance
Attachment
Defines a point and orientation relative to an ancestor PVInstance,
Bone, or another Attachment.
About Attachment
An Attachment defines a point and orientation relative to an ancestor
PVInstance, Bone, or another Attachment. The offset is
stored in the CFrame property. The offset can also
be set through other properties, such as
WorldCFrame.
If no ancestral PVInstance or Attachment exists, then
CFrame and
WorldCFrame are the same.
Attachments are used by several kinds of Constraints and
are also valid alternatives to BasePart as a parent for objects such
as:
ParticleEmitterswhich will emit particles from the attachment's specific position/orientation instead of theBasePartbounds.Light-emitting objects like
PointLightandSpotLightwhich will shine from the attachment's position/orientation instead of theBasePartcenter.AudioEmitterwhich will use the attachment's position as the audio's point of emission.
Properties 11
Axis
: Vector3NotReplicatedDirection of the X axis of the attachment, represented as a unitVector3.Direction of the X axis of the attachment, represented as a unit
Vector3. Together withSecondaryAxis, this property defines the orientation of the attachment. SettingAxisautomatically re-projectsSecondaryAxisonto the plane perpendicular to the new axis so the two always remain orthogonal.The default value is
(1, 0, 0).Orientation
: Vector3HiddenNotReplicatedOrientation of the attachment relative to the orientation of its parent.Orientation of the attachment relative to the orientation of its parent. Rotations are in Z, X, Y order.
Position
: Vector3HiddenNotReplicatedPositional offset of the attachment, relative to the position and orientation of its parent.Positional offset of the attachment, relative to the position and orientation of its parent. This value corresponds to the translational component of
CFrame; changing either property updates the other. The offset is expressed in the local coordinate space of the parentBasePart,Bone, orAttachment.The default value is
(0, 0, 0).SecondaryAxis
: Vector3NotReplicatedDirection of the Y axis of the attachment, represented as a unitVector3.Direction of the Y axis of the attachment, represented as a unit
Vector3. Together withAxis, this property defines the orientation of the attachment. When set, the value is projected onto the plane perpendicular toAxisso the two axes always remain orthogonal; the resulting stored value may therefore differ from the value you assign.The default value is
(0, 1, 0).Visible
: booleanToggles the in-experience visibility of the attachment.Toggles the in-experience visibility of the attachment. When set to
true, the attachment renders as a small green sphere at its world position during gameplay. This is useful for debugging constraint setups or verifying attachment placement without needing Studio's constraint detail overlays.The default value is
false.WorldAxis
: Vector3NotReplicatedDirection of the X axis of the attachment relative to the world, represented as a unitVector3with a length of 1.Direction of the X axis of the attachment relative to the world, represented as a unit
Vector3with a length of 1. This is the world-space equivalent ofAxis, computed by transforming the local axis through the parent'sCFrame. Setting this property converts the supplied direction into the parent's local space and updatesAxisaccordingly.WorldOrientation
: Vector3HiddenNotReplicatedOrientation of the attachment relative to the world rather than its own parent.Orientation of the attachment relative to the world rather than its own parent. Rotations are in Z, X, Y order.
WorldPosition
: Vector3HiddenNotReplicatedPosition of the attachment relative to the world rather than its own parent.Position of the attachment relative to the world rather than its own parent. This is the world-space equivalent of
Position, computed by transforming the local offset through the parent'sCFrame. Setting this property converts the supplied position into the parent's local space and updatesPositionaccordingly.WorldSecondaryAxis
: Vector3NotReplicatedDirection of the Y axis of the attachment relative to the world, represented as a unitVector3with a length of 1.Direction of the Y axis of the attachment relative to the world, represented as a unit
Vector3with a length of 1. This is the world-space equivalent ofSecondaryAxis, computed by transforming the local secondary axis through the parent'sCFrame. Setting this property converts the supplied direction into the parent's local space and updatesSecondaryAxisaccordingly.
Methods 1
GetConstraints
() → List<Constraint>Returns a list ofConstraintsconnected to the attachment.Returns a list of
Constraintsthat use this attachment as eitherAttachment0orAttachment1. The returned array is a snapshot at the time of the call; subsequent changes to constraint connections are not reflected in a previously returned array.
Attachment also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.