Class · inherits Constraint
BallSocketConstraint
Forces its two attachments into the same position and allows them to freely rotate about all three axes, with optional limits to restrict both tilt and twist.
About BallSocketConstraint
A BallSocketConstraint constrains its Attachments so that
they occupy the same position. By default it allows both attachments to freely
rotate about all of their axes, but if
LimitsEnabled is true, the
attachments can only rotate in a limited cone.
Note that if this constraint attaches one part (A) to another part (B) that is anchored or connected to an anchored part (Z), part A will not be locally simulated when interacting with a player.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Limits
You can set limits to restrict both tilt and twist of a ball socket,
similar to how a human's head can tilt and turn within a limited axial range.
Enabling the LimitsEnabled property
exposes the UpperAngle value to
restrict tilt within a cone; it also exposes the
TwistLimitsEnabled property
which, when enabled, lets you restrict twist rotation through the
TwistLowerAngle and
TwistUpperAngle limits.
Properties 8
LimitsEnabled
: booleanSets whether theBallSocketConstraintsets a limit on rotation based onUpperAngle.Sets whether the
BallSocketConstrainthas a limit on rotation based onUpperAngle. Whentrue, it enforces that itsAttachment1isn't rotated more than a set angle from itsAttachment0.MaxFrictionTorque
: floatSets the maximum frictional torque applied to keep itsAttachmentsaligned.Sets the maximum frictional torque applied to keep its
Attachmentsaligned.MaxFrictionTorquespecifies the stiffness of theBallSocketConstraint(how much it resists rotation around itsAttachments).Radius
: floatThe visualized radius of theBallSocketConstraint.Restitution
: floatHow elasticAttachmentsconnected by aBallSocketConstraintwill be when they reach the end of the range specified byUpperAnglewhenLimitsEnabledistrue.How elastic
Attachmentsconnected by aBallSocketConstraintwill be when they reach the end of the range specified byUpperAnglewhenLimitsEnabledistrue. Constrained between 0 and 1.TwistLimitsEnabled
: booleanSets whether theBallSocketConstraintsets a limit on twist rotation based onTwistUpperAngleandTwistLowerAngle.Sets whether the
BallSocketConstraintsets a limit on twist rotation based onTwistUpperAngleandTwistLowerAngle. The twist angle is defined as the angle between the Y axis ofAttachment1and the Y axis ofAttachment0.TwistLowerAngle
: floatSets the lower twist rotation limit of theBallSocketConstraint, as long asTwistLimitsEnabledistrue.TwistUpperAngle
: floatSets the upper twist rotation limit of theBallSocketConstraint, as long asTwistLimitsEnabledistrue.UpperAngle
: floatSets the upper rotation limit of theBallSocketConstraint, as long asLimitsEnabledistrue.
BallSocketConstraint also has every member of Constraint. 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.