Reference API Roblox

Engine API

Website

Related

Reference API Roblox

AnimationConstraint

Aligns two BaseParts with an animate-able kinematic or force-based joint that supports physical simulation (ragdoll, arm strength). The default joint type for R15 avatar rigs.

Member index 13

HistoryMember
723AngularDamping: float
723AngularStrength: float
728EnableSkinning: bool
569IsKinematic: bool
723LinearDamping: float
723LinearStrength: float
553MaxForce: float
553MaxTorque: float
705Transform: CFrame
inherited from Constraint
553Active: bool
553Attachment0: Attachment
553Attachment1: Attachment
553Color: BrickColor
553Enabled: bool
553Visible: bool
604GetDebugAppliedForce(bodyId: int): Vector3
604GetDebugAppliedTorque(bodyId: int): Vector3
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
723IsInSandbox: bool
553Name: string
553Parent: Instance
702PredictionMode: PredictionMode
670Sandboxed: bool
680UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

Replaces Motor6D for Avatar rigs

As part of the Avatar Joint Upgrade, AnimationConstraint is the replacement for Motor6D in R15 player character rigs. When AvatarJointUpgrade is enabled (the default for new experiences), player characters spawn with AnimationConstraints instead of Motor6Ds. Unlike Motor6D, AnimationConstraint supports both kinematic animation and force-based physical simulation — enabling ragdoll physics, arm strength, and other physically simulated character movement without rebuilding the rig.

Migrating from Motor6D

If you have existing code that uses Motor6D for character rigs, note these key differences. See also the Phase 2 migration recommendations.

  • Finding joints: Use :FindFirstChildWhichIsA("AnimationConstraint") instead of :FindFirstChildOfClass("Motor6D"). For code that must support both old and new rigs, check for AnimationConstraint first, then fall back to Motor6D.
  • C0, C1, Part0, Part1: These properties exist on AnimationConstraint as read-only aliases for backwards compatibility. They map to Attachment0.CFrame, Attachment1.CFrame, Attachment0.Parent, and Attachment1.Parent respectively. Do not attempt to write to them.
  • Do not modify RigAttachment.CFrame directly — this disrupts animation retargeting and causes performance issues.
  • Transform: Works identically to Motor6D.Transform — the Animator writes to it each frame. Layer procedural animations by multiplying into Transform during RunService.PreSimulation, which stacks with active animation tracks without breaking retargeting.
  • IsKinematic: When true (default), behavior is equivalent to Motor6D. Set to false to enable force-based physical simulation.
  • Type checks: animConstraint:IsA("Motor6D") returns false. Update any IsA("Motor6D") guards to also accept "AnimationConstraint".
  • Server replication: Instead of setting C0 on the server, use client-side animation evaluation and synchronize data through custom Attributes or UnreliableRemoteEvent.

Example: Procedural neck rotation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
-- Before (Motor6D): writing to C0 directly
local originalC0 = neck.C0
RunService.RenderStepped:Connect(function()
    neck.C0 = originalC0 * computeNeckRotation()
end)

-- After (AnimationConstraint): multiplying into Transform during PreSimulation
RunService.PreSimulation:Connect(function()
    if not animator.EvaluationThrottled then
        neck.Transform = computeNeckRotation() * neck.Transform
    end
end)

Description

An AnimationConstraint constrains its Attachments so that they're offset by Transform. When IsKinematic is true, the parts follow the transform perfectly (identical to Motor6D behavior). When false, the constraint applies forces and torques limited by MaxForce and MaxTorque, enabling physically simulated character movement.

History 28

Members 13

AngularDamping

TypeDefault
float1

The damping ratio (ζ) applied to the rotational part of the constraint. Only used if IsKinematic is false.

A value of 1 corresponds to critical damping, where the constraint reaches its target orientation as fast as possible without overshoot in the absence of other forces or constraints. Values less than 1 are under-damped and oscillate around the target before settling. Values greater than 1 are over-damped and approach the target more slowly without oscillation. A value of 0 applies no angular damping, causing the constraint to oscillate.

Even with this property set to 1, an AnimationConstraint at the root of a multi-body mechanism may still exhibit low-frequency oscillation because it does not "see" the full effective mass of the downstream chain. You can compensate by increasing both AngularStrength and AngularDamping beyond their defaults.

History 1

AngularStrength

TypeDefault
float1

Controls how rigidly the constraint enforces the rotational part of its target Transform. Only used if IsKinematic is false. The resulting torque is capped by MaxTorque.

AngularStrength is defined as a normalized natural frequency, AngularStrength = f / 60, where f is the target natural frequency in Hz. The default value of 1 corresponds to a target frequency of 60 Hz and produces strong tracking of the target orientation. A value of 0 applies no torque. Values less than 1 produce a softer, more compliant rotational response, and values greater than 1 produce a stiffer response.

Use values significantly greater than 1 with caution, as they may cause the simulation to become unstable.

History 1

EnableSkinning

TypeDefault
booltrue

History 1

IsKinematic

TypeDefault
boolfalse

When true, the connected parts follow the Transform perfectly without participating in physics simulation. When false, the connected parts follow the trajectory using forces and torques limited by MaxForce and MaxTorque.

History 1

LinearDamping

TypeDefault
float1

The damping ratio (ζ) applied to the translational part of the constraint. Only used if IsKinematic is false.

A value of 1 corresponds to critical damping, where the constraint reaches its target position as fast as possible without overshoot in the absence of other forces or constraints. Values less than 1 are under-damped and oscillate around the target before settling. Values greater than 1 are over-damped and approach the target more slowly without oscillation. A value of 0 applies no linear damping, causing the constraint to oscillate.

LinearDamping has no effect when LinearStrength is 0.

History 1

LinearStrength

TypeDefault
float1

Controls how rigidly the constraint enforces the translational part of its target Transform. Only used if IsKinematic is false. The resulting force is capped by MaxForce.

LinearStrength uses the same normalized natural frequency definition as AngularStrength, LinearStrength = f / 60, where f is the target natural frequency in Hz. The default value of 1 corresponds to a target frequency of 60 Hz and produces strong tracking of the target position. A value of 0 applies no force. Values less than 1 produce a softer, more compliant positional response, and values greater than 1 produce a stiffer response.

Splitting angular and linear parameters lets you make orientation tracking stiff while keeping positional tracking soft, or vice-versa. As with AngularStrength, use values significantly greater than 1 with caution, as they may cause the simulation to become unstable.

History 1

MaxForce

TypeDefault
float10000

Maximum force magnitude the constraint can apply to achieve its goal. Only used if IsKinematic is false.

History 2

MaxTorque

TypeDefault
float10000

Maximum torque the constraint can use to reach its goal. Only used if IsKinematic is false.

History 2

Transform

TypeDefault
CFrame0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1

The internal CFrame that is manipulated when the constraint is being animated.

Note that AnimationConstraint transforms are not applied immediately, but rather as a batch in a parallel job after RunService.PreSimulation, immediately before physics steps. The deferred batch update is much more efficient than many immediate updates. If the AnimationConstraint is part of an animated model with an Animator, then Transform is usually overwritten every frame by the Animator after RunService.PreAnimation and before RunService.PreSimulation.

History 5

Settings