Constraint

Constraint : Instance

Overview

Description

A Constraint is a base class used to represent various constraints applied to objects in a simulation or scene. These constraints help control the behavior of objects, how they attach to one another, and additional properties like visibility and state.

Properties

Attachment0

Attachment

This property represents the first attachment point for the constraint. It is used to define where the constraint connects on the first object.

Code Samples

local LinearVelocity = script.Parent

LinearVelocity.Attachment0 = Attachment

Attachment1

Attachment

This property represents the second attachment point for the constraint. It defines the connection of the constraint to another object.

Code Samples

local LinearVelocity = script.Parent

LinearVelocity.Attachment1 = Attachment

Color

Color3

This property allows customization of the display or visualization color of the constraint.

Code Samples

Enabled

bool

This property determines whether the constraint is enabled (true) or disabled (false). If disabled, the constraint will not affect the attached objects.

Code Samples

Visible

bool

This property controls the visibility of the constraint in the scene. If true, the constraint is visible; otherwise, it is hidden.

Code Samples

Methods

Events

Last updated