Open Asterune
SpringConstraint

SpringConstraint

Applies spring and damping forces between two attachments.

Creatable
Instance.new("SpringConstraint")
Inherits
ConstraintInstance
Replication
Standard

Behavior

SpringConstraint applies spring and damping forces between two attachments.

Summary

Members18
Properties17
  • Active: boolean = falseparallel readread onlydoes not replicate

    Whether the constraint is currently active in the physics simulation.

  • Attachment0: Attachment? = nilparallel read

    The first attachment used by the constraint or effect.

  • Attachment1: Attachment? = nilparallel read

    The second attachment used by the constraint or effect.

  • Coils: number = 3parallel read

    The number of coils used to visualize the spring.

  • Color: Color3 = Color3.new(1, 0.686, 0)parallel read

    The color of the constraint visualization.

  • CurrentLength: number = 0parallel readread onlydoes not replicate

    The current distance between the connected attachments, in studs.

  • Damping: number = 1parallel read

    The spring's damping coefficient.

  • Enabled: boolean = trueparallel read

    Whether the physics solver processes this constraint.

  • FreeLength: number = 2parallel read

    The spring length at which it applies no restoring force, in studs.

  • LimitsEnabled: boolean = falseparallel read

    Whether the constraint enforces its positional or angular limits.

  • MaxForce: number = infparallel read

    The maximum force the actuator can apply.

  • MaxLength: number = 10parallel read

    The maximum length permitted by the constraint, in studs.

  • MinLength: number = 0parallel read

    The minimum length permitted by the constraint, in studs.

  • Radius: number = 0.2parallel read

    The radius of the constraint visualization.

  • Stiffness: number = 10parallel read

    The spring's restoring-force coefficient.

  • Thickness: number = 0.1parallel read

    The thickness of the stroke or shell.

  • Visible: boolean = falseparallel read

    Whether the constraint visualization is displayed.

Methods1

Properties

Active

SpringConstraint.Active: boolean = false

Whether the constraint is currently active in the physics simulation.

Attachment0

SpringConstraint.Attachment0: Attachment? = nil

The first attachment used by the constraint or effect.

Attachment1

SpringConstraint.Attachment1: Attachment? = nil

The second attachment used by the constraint or effect.

Coils

SpringConstraint.Coils: number = 3

The number of coils used to visualize the spring.

Color

SpringConstraint.Color: Color3 = Color3.new(1, 0.686, 0)

The color of the constraint visualization.

CurrentLength

SpringConstraint.CurrentLength: number = 0

The current distance between the connected attachments, in studs.

Damping

SpringConstraint.Damping: number = 1

The spring's damping coefficient.

Enabled

SpringConstraint.Enabled: boolean = true

Whether the physics solver processes this constraint.

FreeLength

SpringConstraint.FreeLength: number = 2

The spring length at which it applies no restoring force, in studs.

LimitsEnabled

SpringConstraint.LimitsEnabled: boolean = false

Whether the constraint enforces its positional or angular limits.

MaxForce

SpringConstraint.MaxForce: number = inf

The maximum force the actuator can apply.

MaxLength

SpringConstraint.MaxLength: number = 10

The maximum length permitted by the constraint, in studs.

MinLength

SpringConstraint.MinLength: number = 0

The minimum length permitted by the constraint, in studs.

Radius

SpringConstraint.Radius: number = 0.2

The radius of the constraint visualization.

Stiffness

SpringConstraint.Stiffness: number = 10

The spring's restoring-force coefficient.

Thickness

SpringConstraint.Thickness: number = 0.1

The thickness of the stroke or shell.

Visible

SpringConstraint.Visible: boolean = false

Whether the constraint visualization is displayed.

Methods

GetExecutionGroup

SpringConstraint:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

Inherited members

Inherited47

Constraint