Class
SlidingBallConstraint
NotCreatable
The base class for constraints that allow their attachments to slide along an axis.
SlidingBallConstraint is the base class for constraints that allow their
attachments to slide along an axis, including PrismaticConstraint and
CylindricalConstraint. The base class does not restrict rotation.
PrismaticConstraint prevents rotation, while
CylindricalConstraint allows rotation about an axis.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Linear Power#
If this constraint's ActuatorType is set to
Motor, it attempts to translate the attachments with the
goal of reaching Velocity. You can further
control this translation through both
MotorMaxAcceleration and
MotorMaxForce.
If this constraint's ActuatorType is set to
Servo, it attempts to translate the attachments to a set
separation specified by TargetPosition. This
translation is controlled by Speed,
LinearResponsiveness, and
ServoMaxForce.
Limits#
You can set limits to restrict this constraint's sliding range. Enabling
the LimitsEnabled property exposes the
LowerLimit and
UpperLimit values, as well as
Restitution which defines the elasticity of the
attachments when they reach either limit.
Properties 15#
ActuatorTypeActuatorType | Sets whether the translation of the SlidingBallConstraint is
actuated and, if so, what kind of actuation.ReadSafe |
CurrentPositionfloat | The current offset between the constraint's
Attachments.ReadSafeReadOnlyNotReplicated |
LimitsEnabledboolean | Sets whether the SlidingBallConstraint will limit the range of
translation.ReadSafe |
LinearResponsivenessfloat | Specifies the "sharpness" of the linear servo motor in reaching the
TargetPosition.ReadSafe |
LowerLimitfloat | The lower positional limit along the X axis of
Attachment0 if
LimitsEnabled is true.ReadSafe |
MotorMaxAccelerationfloat | The constraint's maximum acceleration when
ActuatorType is set to
Motor as the constraint attempts to reach its desired
Velocity.ReadSafe |
MotorMaxForcefloat | The constraint's maximum force when
ActuatorType is set to
Motor, as the constraint attempts to reach its desired
Velocity.ReadSafe |
Restitutionfloat | The elasticity of the constraint's Attachments when
they reach the end of the range specified by
UpperLimit and
LowerLimit, assuming
LimitsEnabled is set to true.ReadSafe |
ServoMaxForcefloat | The constraint's maximum force when
ActuatorType is set to
Servo, as the constraint attempts to reach its desired
Speed.ReadSafe |
Sizefloat | The constraint's visualized size.ReadSafe |
SoftlockServoUponReachingTargetboolean | ReadSafeDeprecated |
Speedfloat | The constraint's desired speed when
ActuatorType is set to
Servo, as the constraint translates towards its
TargetPosition. Measured in
studs per second.ReadSafe |
TargetPositionfloat | The constraint's attempted target position when
ActuatorType is set to
Servo. Measured in studs.ReadSafe |
UpperLimitfloat | The upper positional limit along the X axis of
Attachment0 if
LimitsEnabled is true.ReadSafe |
Velocityfloat | The constraint's attempted velocity when
ActuatorType is set to
Motor. Measured in studs per second.ReadSafe |
ActuatorType: ActuatorType#
ReadSafe
Sets whether the translation of the SlidingBallConstraint is
actuated and, if so, what kind of actuation.
If
ActuatorTypeis set toNone, the joint can slide freely.If
ActuatorTypeis set toMotor, it attempts to translate the attachments with the goal of reachingVelocity. You can further control this translation through bothMotorMaxAccelerationandMotorMaxForce.If this constraint's
ActuatorTypeis set toServo, it attempts to translate the attachments to a set separation specified byTargetPosition. This translation is controlled bySpeed,LinearResponsiveness, andServoMaxForce.
CurrentPosition: float#
ReadOnlyNotReplicatedReadSafe
The current offset between the constraint's
Attachments.
LimitsEnabled: boolean#
ReadSafe
Sets whether the SlidingBallConstraint will limit the range of
translation. If true, this property exposes the
LowerLimit and
UpperLimit values, as well as
Restitution which defines the elasticity of
the attachments when they reach either limit.
LinearResponsiveness: float#
ReadSafe
Specifies the "sharpness" of the linear servo motor in reaching the
TargetPosition when the
derived classes' actuator type is set to Servo. Larger
values correspond to faster a response and smaller values results in more
damping and a slower response.
LowerLimit: float#
ReadSafe
The lower positional limit along the X axis of
Attachment0 if
LimitsEnabled is true.
MotorMaxAcceleration: float#
ReadSafe
The constraint's maximum acceleration when
ActuatorType is set to
Motor, as the constraint attempts to reach its desired
Velocity.
MotorMaxForce: float#
ReadSafe
The constraint's maximum force when
ActuatorType is set to
Motor, as the constraint attempts to reach its desired
Velocity.
Restitution: float#
ReadSafe
The elasticity of the constraint's Attachments when
they reach the end of the range specified by
UpperLimit and
LowerLimit, assuming
LimitsEnabled is set to true.
The valid range is between 0–1.
ServoMaxForce: float#
ReadSafe
The constraint's maximum force when
ActuatorType is set to
Servo, as the constraint attempts to reach its desired
Speed.
Size: float#
ReadSafe
The constraint's visualized size.
SoftlockServoUponReachingTarget: boolean#
DeprecatedReadSafeDeprecated
Deprecated. This property should not be used in new work.
Speed: float#
ReadSafe
The constraint's desired speed when
ActuatorType is set to
Servo, as the constraint translates towards its
TargetPosition. Measured in
studs per second.
TargetPosition: float#
ReadSafe
The constraint's attempted target position when
ActuatorType is set to
Servo Measured in studs.
UpperLimit: float#
ReadSafe
The upper positional limit along the X axis of
Attachment0 if
LimitsEnabled is true.
Velocity: float#
ReadSafe
The constraint's attempted velocity when
ActuatorType is set to
Motor. Measured in studs per second.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild