# SlidingBallConstraint

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Constraint](https://rapi.sleaze.dev/classes/Constraint.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Subclasses: [CylindricalConstraint](https://rapi.sleaze.dev/classes/CylindricalConstraint.md), [PrismaticConstraint](https://rapi.sleaze.dev/classes/PrismaticConstraint.md)
- Tags: Not creatable
- Memory category: BaseParts
- HTML page: https://rapi.sleaze.dev/classes/SlidingBallConstraint/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/SlidingBallConstraint

The base class for constraints that allow their attachments to slide along an axis.

## Properties

### Size

```luau
SlidingBallConstraint.Size: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's visualized size.

### CurrentPosition

```luau
SlidingBallConstraint.CurrentPosition: number
```

- Tags: Read only, Read capabilities: Physics, Save only, Simulation access

The current offset between the constraint's `Attachments`.

### LowerLimit

```luau
SlidingBallConstraint.LowerLimit: number
```

- Tags: Read capabilities: Physics, Simulation access

The lower positional limit along the **X** axis of [`Attachment0`](https://rapi.sleaze.dev/classes/Constraint.md) if [`LimitsEnabled`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is true.

### Restitution

```luau
SlidingBallConstraint.Restitution: number
```

- Tags: Read capabilities: Physics, Simulation access

The elasticity of the constraint's `Attachments` when they reach the end of the range specified by [`UpperLimit`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) and [`LowerLimit`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md), assuming [`LimitsEnabled`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to true.

### UpperLimit

```luau
SlidingBallConstraint.UpperLimit: number
```

- Tags: Read capabilities: Physics, Simulation access

The upper positional limit along the **X** axis of [`Attachment0`](https://rapi.sleaze.dev/classes/Constraint.md) if [`LimitsEnabled`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is true.

### MotorMaxAcceleration

```luau
SlidingBallConstraint.MotorMaxAcceleration: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's maximum acceleration when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to [`Motor`](https://rapi.sleaze.dev/classes/Motor.md) as the constraint attempts to reach its desired [`Velocity`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md).

### MotorMaxForce

```luau
SlidingBallConstraint.MotorMaxForce: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's maximum force when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to [`Motor`](https://rapi.sleaze.dev/classes/Motor.md), as the constraint attempts to reach its desired [`Velocity`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md).

### Velocity

```luau
SlidingBallConstraint.Velocity: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's attempted velocity when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to [`Motor`](https://rapi.sleaze.dev/classes/Motor.md). Measured in studs per second.

### LinearResponsiveness

```luau
SlidingBallConstraint.LinearResponsiveness: number
```

- Tags: Read capabilities: Physics, Simulation access

Specifies the "sharpness" of the linear servo motor in reaching the [`TargetPosition`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md).

### ServoMaxForce

```luau
SlidingBallConstraint.ServoMaxForce: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's maximum force when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to `Servo`, as the constraint attempts to reach its desired [`Speed`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md).

### Speed

```luau
SlidingBallConstraint.Speed: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's desired speed when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to `Servo`, as the constraint translates towards its [`TargetPosition`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md). Measured in studs per second.

### TargetPosition

```luau
SlidingBallConstraint.TargetPosition: number
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's attempted target position when [`ActuatorType`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is set to `Servo`. Measured in studs.

### SoftlockServoUponReachingTarget

```luau
SlidingBallConstraint.SoftlockServoUponReachingTarget: boolean
```

- Tags: Deprecated, Read capabilities: Physics, Simulation access

**Deprecated:** This property should not be used in new work.

### ActuatorType

```luau
SlidingBallConstraint.ActuatorType: Enum.ActuatorType
```

- Tags: Read capabilities: Physics, Simulation access

Sets whether the translation of the [`SlidingBallConstraint`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) is actuated and, if so, what kind of actuation.

### LimitsEnabled

```luau
SlidingBallConstraint.LimitsEnabled: boolean
```

- Tags: Read capabilities: Physics, Simulation access

Sets whether the [`SlidingBallConstraint`](https://rapi.sleaze.dev/classes/SlidingBallConstraint.md) will limit the range of translation.

## Inherited members

- From [Constraint](https://rapi.sleaze.dev/classes/Constraint.md): `Color`, `Visible`, `Attachment0`, `Attachment1`, `Active`, `Enabled`, `GetDebugAppliedForce`, `GetDebugAppliedTorque`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
