# BallSocketConstraint

Show Deprecated

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 BallSocketConstraint.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.

## Summary

### Properties

Sets whether the BallSocketConstraint sets a limit on rotation based on BallSocketConstraint.UpperAngle.

Sets the maximum frictional torque applied to keep its Attachments aligned.

The visualized radius of the BallSocketConstraint.

How elastic Attachments connected by a BallSocketConstraint will be when they reach the end of the range specified by BallSocketConstraint.UpperAngle when BallSocketConstraint.LimitsEnabled is true.

Sets whether the BallSocketConstraint sets a limit on twist rotation based on BallSocketConstraint.TwistUpperAngle and BallSocketConstraint.TwistLowerAngle.

Sets the lower twist rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.TwistLimitsEnabled is true.

Sets the upper twist rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.TwistLimitsEnabled is true.

Sets the upper rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.LimitsEnabled is true.

## Properties

### LimitsEnabled

Sets whether the BallSocketConstraint has a limit on rotation based on BallSocketConstraint.UpperAngle. When a BallSocketConstraint has LimitsEnabled set to true, it enforces that its Constraint.Attachment1 isn't rotated more than a set angle from its Constraint.Attachment0.

The angle that is used is the angle between the x-axes of the Attachments:

### MaxFrictionTorque

Sets the maximum frictional torque applied to keep its Attachments aligned.

MaxFrictionTorque specifies the stiffness of the BallSocketConstraint, i.e. how much it resists rotation around its Attachments. Constrained to be greater than or equal to 0.

The visualized radius of the BallSocketConstraint.

### Restitution

How elastic Attachments connected by a BallSocketConstraint will be when they reach the end of the range specified by BallSocketConstraint.UpperAngle when BallSocketConstraint.LimitsEnabled is true. Constrained between 0 and 1.

### TwistLimitsEnabled

Sets whether the BallSocketConstraint sets a limit on twist rotation based on BallSocketConstraint.TwistUpperAngle and BallSocketConstraint.TwistLowerAngle. The twist angle is defined as the angle between the y-axis of Constraint.Attachment1 and the y-axis of Constraint.Attachment0.

When a BallSocketConstraint has TwistLimitsEnabled set to true, it enforces that its Constraint.Attachment1 isn't twisted more than a set angle from its Constraint.Attachment0.

### TwistLowerAngle

Sets the lower twist rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.TwistLimitsEnabled is true.

### TwistUpperAngle

Sets the upper twist rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.TwistLimitsEnabled is true.

### UpperAngle

Sets the upper rotation limit of the BallSocketConstraint, as long as BallSocketConstraint.LimitsEnabled is true.