Rig
Finds the joints of an R15 character built with Roblox's Avatar Joint Upgrade (the
AnimationConstraint and BallSocketConstraint pairs that replaced Motor6D) and
switches them between three modes without ever adding or replacing a joint:
- Kinematic:
IsKinematic = true, the stock behaviour. Animations drive the parts exactly. -
Muscle: the upper body (waist, neck, arms) is simulated with a soft
AngularStrengthso it lags and swings with the body, while the root and legs stay kinematic so theHumanoidkeeps the character on its feet. This is the staggering look. - Limp: every joint is simulated with almost no strength, the ball sockets provide the limits, and the character is a ragdoll.
Everything a mode touches is snapshotted first so Rig.restore puts it all back.
Only the server calls into this (joint properties replicate from the server, and the network
owner simulates them). Rigs still on Motor6D are reported as unsupported: Rig.get returns
nil and Stagger warns once, because the whole point is to use the joints Roblox already
gave the character.
Properties
UPPER_JOINTS
This item is read only and cannot be modified. Read OnlyRig.UPPER_JOINTS: {string}Joint names simulated in Muscle mode: Waist, Neck, both shoulders, elbows and wrists.
LOWER_JOINTS
This item is read only and cannot be modified. Read OnlyRig.LOWER_JOINTS: {string}Joint names kept kinematic in Muscle mode: Root, both hips, knees and ankles.
Functions
isSupported
Returns whether character is an R15 rig on AnimationConstraints (the Avatar Joint Upgrade).
get
Collects the joints of character. Returns nil when the character is not a supported rig
(see Rig.isSupported).
apply
Rig.apply(mode: Mode,strength: number,--
AngularStrength for the simulated joints in this mode (ignored for Kinematic).
damping: number--
AngularDamping for the simulated joints in this mode (ignored for Kinematic).
) → ()
Puts the rig in mode. Takes the snapshot on the first call. The strength and damping
come from the Config (MuscleStrength / MuscleDamping or LimpStrength / LimpDamping).
setOwner
Gives owner (a player, or nil for the server) network ownership of every unanchored part
of the rig, so the peer driving the stagger is the one simulating the body. Used for NPCs;
ownership of a player's character is left to Roblox.
releaseOwner
Hands ownership of the rig back to Roblox's automatic assignment once the stagger is over.
restore
Restores every joint, ball socket, collision flag and AutoRotate the snapshot recorded,
and forgets the snapshot. WalkSpeed and the Humanoid state flags are owner-side and are
handled by the Controller. Does nothing if no mode was ever applied.