Constraint
The base class for constraint-based objects.
This class is not creatable. Instances of this class cannot be created with Instance.new.
| Memory category | BaseParts |
|---|
Member index 8
Description
The base class for constraint-based objects. See mover constraints and mechanical constraints for more details.
History 44
- 726 Change Default of Visible from to
- 726 Change Default of Enabled from to
- 726 Change Default of Color from to
- 726 Change Default of Attachment1 from to
- 726 Change Default of Attachment0 from to
- 726 Change Default of Active from to
- 693 Change MemoryCategory of Constraint from PhysicsParts to BaseParts
- 604 Add GetDebugAppliedTorque
- 604 Add GetDebugAppliedForce
- 603 Remove GetDebugAppliedTorque
- 603 Remove GetDebugAppliedForce
- 604 Add GetDebugAppliedTorque
- 604 Add GetDebugAppliedForce
- 553 Change Default of Visible from to
- 553 Change Default of Enabled from to
- 553 Change Default of Color from to
- 553 Change Default of Attachment1 from to
- 553 Change Default of Attachment0 from to
- 553 Change Default of Active from to
- 486 Change ThreadSafety of Visible from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Enabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Color from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Attachment1 from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Attachment0 from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Active from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Visible from to ReadOnly
- 462 Change ThreadSafety of Enabled from to ReadOnly
- 462 Change ThreadSafety of Color from to ReadOnly
- 462 Change ThreadSafety of Attachment1 from to ReadOnly
- 462 Change ThreadSafety of Attachment0 from to ReadOnly
- 462 Change ThreadSafety of Active from to ReadOnly
- 454 Change MemoryCategory of Constraint from Instances to PhysicsParts
- 452 Change MemoryCategory of Constraint from PhysicsParts to Instances
- 453 Change MemoryCategory of Constraint from Instances to PhysicsParts
- 379 Change CanSave of Active from true to false
- 360 Add Active
- 329 Change ValueType of Attachment1 from Object to Attachment
- 329 Change ValueType of Attachment0 from Object to Attachment
- 261 Add Visible
- 261 Add Color
- 241 Add Enabled
- 241 Add Attachment1
- 241 Add Attachment0
- 241 Add Constraint
Members 8
Active
| Type | Default | |
|---|---|---|
| bool | ||
This property is true if the constraint and both of its parts are in the
Workspace and the constraint's Constraint.Enabled property
is true.
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | false |
Attachment0
| Type | Default | |
|---|---|---|
| Attachment | ||
The Attachment that is connected to Constraint.Attachment1
| Thread safety | ReadSafe |
|---|---|
| Category | Attachments |
| Loaded/Saved | true |
History 6
- 726 Change Default of Attachment0 from to
- 553 Change Default of Attachment0 from to
- 486 Change ThreadSafety of Attachment0 from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Attachment0 from to ReadOnly
- 329 Change ValueType of Attachment0 from Object to Attachment
- 241 Add Attachment0
Attachment1
| Type | Default | |
|---|---|---|
| Attachment | ||
The Attachment that is connected to Constraint.Attachment0
| Thread safety | ReadSafe |
|---|---|
| Category | Attachments |
| Loaded/Saved | true |
History 6
- 726 Change Default of Attachment1 from to
- 553 Change Default of Attachment1 from to
- 486 Change ThreadSafety of Attachment1 from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Attachment1 from to ReadOnly
- 329 Change ValueType of Attachment1 from Object to Attachment
- 241 Add Attachment1
Color
| Type | Default | |
|---|---|---|
| BrickColor | ||
The color of the constraint.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
Enabled
| Type | Default | |
|---|---|---|
| bool | ||
Toggles whether or not the constraint is enabled.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
GetDebugAppliedForce
| Parameters (1) | ||
|---|---|---|
| bodyId | int | |
| Returns (1) | ||
| Vector3 | ||
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.
| Thread safety | Unsafe |
|---|
History 3
- 604 Add GetDebugAppliedForce
- 603 Remove GetDebugAppliedForce
- 604 Add GetDebugAppliedForce
GetDebugAppliedTorque
| Parameters (1) | ||
|---|---|---|
| bodyId | int | |
| Returns (1) | ||
| Vector3 | ||
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.
| Thread safety | Unsafe |
|---|
History 3
- 604 Add GetDebugAppliedTorque
- 603 Remove GetDebugAppliedTorque
- 604 Add GetDebugAppliedTorque
Visible
| Type | Default | |
|---|---|---|
| bool | ||
Toggles the constraint's visibility.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |