Class · inherits Constraint
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.
About AnimationConstraint
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, andAttachment1.Parentrespectively. 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— theAnimatorwrites to it each frame. Layer procedural animations by multiplying intoTransformduringRunService.PreSimulation, which stacks with active animation tracks without breaking retargeting. - IsKinematic: When
true(default), behavior is equivalent to Motor6D. Set tofalseto enable force-based physical simulation. - Type checks:
animConstraint:IsA("Motor6D")returnsfalse. Update anyIsA("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
-- 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.
Properties 8
AngularDamping
: floatDamping ratio for the rotational part of the constraint. Higher values reduce oscillation around the target orientation.The damping ratio (ζ) applied to the rotational part of the constraint. Only used if
IsKinematicisfalse.A value of
1corresponds 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 than1are under-damped and oscillate around the target before settling. Values greater than1are over-damped and approach the target more slowly without oscillation. A value of0applies no angular damping, causing the constraint to oscillate.Even with this property set to
1, anAnimationConstraintat 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 bothAngularStrengthandAngularDampingbeyond their defaults.AngularStrength
: floatControls how rigidly the constraint enforces the rotational part of its targetTransform. Higher values track the target orientation more stiffly.Controls how rigidly the constraint enforces the rotational part of its target
Transform. Only used ifIsKinematicisfalse. The resulting torque is capped byMaxTorque.AngularStrengthis defined as a normalized natural frequency,AngularStrength = f / 60, wherefis the target natural frequency in Hz. The default value of1corresponds to a target frequency of 60 Hz and produces strong tracking of the target orientation. A value of0applies no torque. Values less than1produce a softer, more compliant rotational response, and values greater than1produce a stiffer response.Use values significantly greater than
1with caution, as they may cause the simulation to become unstable.IsKinematic
: booleanToggles whether the constraint is kinematic or physically simulated.LinearDamping
: floatDamping ratio for the translational part of the constraint. Higher values reduce oscillation around the target position.The damping ratio (ζ) applied to the translational part of the constraint. Only used if
IsKinematicisfalse.A value of
1corresponds 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 than1are under-damped and oscillate around the target before settling. Values greater than1are over-damped and approach the target more slowly without oscillation. A value of0applies no linear damping, causing the constraint to oscillate.LinearDampinghas no effect whenLinearStrengthis0.LinearStrength
: floatControls how rigidly the constraint enforces the translational part of its targetTransform. Higher values track the target position more stiffly.Controls how rigidly the constraint enforces the translational part of its target
Transform. Only used ifIsKinematicisfalse. The resulting force is capped byMaxForce.LinearStrengthuses the same normalized natural frequency definition asAngularStrength,LinearStrength = f / 60, wherefis the target natural frequency in Hz. The default value of1corresponds to a target frequency of 60 Hz and produces strong tracking of the target position. A value of0applies no force. Values less than1produce a softer, more compliant positional response, and values greater than1produce 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 than1with caution, as they may cause the simulation to become unstable.MaxForce
: floatMaximum force magnitude the constraint can apply to achieve its goal.Maximum force magnitude the constraint can apply to achieve its goal. Only used if
IsKinematicisfalse.MaxTorque
: floatMaximum torque the constraint can apply to reach its goal.Maximum torque the constraint can use to reach its goal. Only used if
IsKinematicisfalse.Transform
: CFrameDescribes the current animation offset of the constraint joint.The internal
CFramethat is manipulated when the constraint is being animated.Note that
AnimationConstrainttransforms are not applied immediately, but rather as a batch in a parallel job afterRunService.PreSimulation, immediately before physics steps. The deferred batch update is much more efficient than many immediate updates. If theAnimationConstraintis part of an animated model with anAnimator, thenTransformis usually overwritten every frame by theAnimatorafterRunService.PreAnimationand beforeRunService.PreSimulation.
AnimationConstraint also has every member of Constraint. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.