Roblox Physics
When to Load
Fixing or reviewing ragdolls, corpses, knockback, ownership, hit queries or physics cost. Server Authority: roblox-networking.
"Field-measured" = measured in one of the owner's projects; verify on your content.
Traps (symptom -> cause -> fix)
- Code finds no
Motor6D-> new R15 rigs (2026) have none: 15AnimationConstraint+ 14 enabledBallSocketConstraint. Never writeC0/C1(§1). - Ragdoll shakes -> sockets added on top of the built-in ones. Remove them.
- Ragdoll stays stiff ->
IsKinematic = falsealone holds the pose; also setAngularStrength = 0(orEnabled = false) (Studio 2026-11). - Pelvis twitches while limp -> the animated Root joint (HRP→LowerTorso) still drives it. Weld HRP-LowerTorso during ragdoll; restore Root on get-up (§2).
- Corpse limbs sink -> R15 limbs default
CanCollide = falseand a live Humanoid keeps forcing it. LimbsCanCollide = true, destroy Humanoid and HRP. - Kill knockback tiny -> pushed on the death frame. Apply one physics step later, once, on
AssemblyRootPart. - Bot deaths fling randomly -> bots are server-owned, players client-owned. Check owner, impulse once on root scaled by
AssemblyMass, Humanoid state (§2). - Players can't push bodies -> clients can't push server-owned parts. Hitter ownership: ~67 ms vs ~200 ms reaction at 120 ms ping; mid-flight handoff is a small pop (§3).
- Impulse works once / body doesn't move -> apply on the owner, on
AssemblyRootPart(a massless welded part desynced), reset leftover velocity (§3). - Shots pass through / melee hits invisible boxes ->
CanQuery = falseworks only whenCanCollide = false(docs); rays hitCanCollide = falseparts unlessRespectCanCollide = true. Then filters,CollisionGroup(§4). - Placement refused, "tool does nothing" -> Include list misses the real colliders; server never told the client why (§4).
- Physics ms high -> contacts: a free part holds far more than it touches; Motor6D/bones don't help. Read
Stats.ContactsCountdelta, collision groups, anchor at rest,BulkMoveTo(§5). - Head won't fragment ->
GeometryService:FragmentAsyncfails on the stock head mesh. 240 fragments froze ~221 ms, ~60 was fine (field-measured).
Limits (field-measured)
| Case | Cost |
|---|---|
| Free part in a dense map of small parts | ~300 contacts while touching ~2 |
| ~100 free debris pieces | 30k contacts, 30-45 ms physics |
| Collision group: debris ignores tiny map parts | 239 -> 41 contacts per piece |
| 1,750-part fallen piece at rest, unanchored vs anchored | 17 ms vs 6 ms per step |
5.5k physics parts vs 5k anchored via BulkMoveTo |
60-70 ms vs 6-11 ms |
| Waking a large settled body for an unrelated hit | ~41 ms physics for seconds |
| Client simulation range | parts ~1,400 studs away didn't simulate |
1. Character rigs: AnimationConstraint (2026-11)
With StarterPlayer.AvatarJointUpgrade on (default for new experiences; a Studio setting, not script-writable), R15 characters spawn with AnimationConstraint joints. Default R15 in Studio, November 2026: 15 AnimationConstraint, 14 enabled BallSocketConstraint, 4 RigidConstraint, no Motor6D.
| Motor6D habit | On an AnimationConstraint rig |
|---|---|
FindFirstChildOfClass("Motor6D"), IsA("Motor6D") |
Finds nothing. Accept AnimationConstraint, fall back to Motor6D for legacy/custom rigs |
Write C0/C1/Part0/Part1 |
Read-only aliases of the attachments. Don't edit RigAttachment.CFrame either (breaks retargeting) |
neck.C0 = base * rot per frame |
joint.Transform = rot * joint.Transform in RunService.PreSimulation (the Animator overwrites Transform before that); skip frames where Animator.EvaluationThrottled |
IsKinematic = false makes a joint chase Transform with force: LinearStrength/AngularStrength are normalized frequency (f / 60; 0 = no force; well above 1 goes unstable), *Damping 1 = critical.
2. Ragdolls, corpses, death launches
Limp test (Studio 2026-11, default R15, mean joint deviation after 4 s): IsKinematic = true 0.0°; IsKinematic = false with defaults (AngularStrength = 1) 2.1°, holds pose; plus AngularStrength = 0 44.5°, limp; Enabled = false 44.3°. Hand-built sockets doubled 14 to 28 and shook: list the rig's constraints by class first.
- Recover by restoring recorded values (don't rebuild joints), then
GettingUp, then return ownership. Stacked stun/ragdoll effects need one recovery owner, or the second snapshots modified joints as "original".
Pelvis twitch (field-measured): the cause is the Root joint, not the waist joint or torso collisions. Disable Root and hold HRP to LowerTorso with a WeldConstraint for the ragdoll; on get-up destroy the weld and re-enable Root.
Corpses:
- Keep any root collision box no wider than the body.
- Settle: anchor once every part moved under ~0.25 studs and 5° for 0.3 s, never in the air; wake on a hit; cap the count, fade oldest first.
- Client-simulated death copies must drop rig attachments or their Humanoid rebuilds joints.
FragmentAsyncworked on R15 torso and limbs; for heads use a custom mesh or pre-made pieces.
Kill knockback (field-measured): death-frame pushes moved bodies ~3 studs while survivors flew; apply after the next PostSimulation/Heartbeat. A disabled Dead state prevents Humanoid.Died; keep bot-only corpse workarounds off real players.
3. Ownership, velocity, assemblies
- Responsive hits on shared bodies: give ownership to the hitter with hysteresis (last hitter for a few seconds, else nearest player in a radius); damage stays on the server.
- Anchoring a character root to freeze it gives infinite assembly mass: mass-scaled forces become infinite and position goes NaN on unanchor. Freeze with zero walk/jump.
- Player-owned physics is not a security boundary. Server Authority (
Workspace.AuthorityMode = Server) keeps core objects server-owned with prediction;SetNetworkOwner()is not a substitute. Continuous input goes throughRunService:BindToSimulation()(needsWorkspace.UseFixedSimulation); make hit transitions idempotent across resimulation. Movers andBodyMovers may need rework (DevForum 2026-07). Details:roblox-networking.
Field-measured:
- Judge a launch by
AssemblyCenterOfMass/AssemblyLinearVelocity, not one part (a tipping plate raised a corner 88 studs at zero velocity). - Overlapping client copies launched up to 330 studs/s despite
NoCollisionConstraints; cap rise, speed and spin inHeartbeat. - Dash momentum dies when
LinearVelocityis disabled (the Humanoid zeroes sideways speed): keep it on, aimed at current velocity minusGravity * dton Y. IKControlon arms flipped 120-180° per frame when a hand crossed the chest or went overhead. Use analytic two-bone IK intoTransforminPreSimulation, elbow bent toward a fixed pole.
4. Raycasts and spatial queries
- Invisible colliding boxes caught every close melee ray despite
CanQuery = false. Visual MeshPart floor (CanCollide off) over an invisible collider: decideRespectCanCollidedeliberately. ExcludeInstances/IncludeInstancescombine; exclusion wins.IncludeInstances = nil= everything,{}= nothing. LegacyFilterDescendantsInstances+FilterTypestill works.- Include only hits descendants of the listed instances: colliders outside the arena folder made placement rays miss real floors. Send the player a visible refusal reason.
- New (2026-11):
RaycastParams.Margin(>= 0) expands the cast shape, so non-zero onRaycastis a sphere cast (counts toward the size limit).RaycastParams.SizeGradient(>= -1) scales the shape over the cast (1ends twice as large), for cone melee sweeps.WorldRoot:Shapecast(part, dir, params?, cframeOverride?, sizeOverride?)casts a part's geometry from another pose without moving it; it ignores parts initially intersecting (useGetPartsInPart), max 1024 studs, throws on Terrain.
5. Contacts and debris
- Cost is contacts, not which machine simulates. Cheap debris = anchored, non-colliding parts moved by your own sim with one
workspace:BulkMoveToper frame and raycasts for landing, or one invisible physics proxy per chunk carrying anchored visuals. Stats.ContactsCountis scene-wide: price an object by reading it before and after adding it.GetTouchingPartswon't show the hidden contacts.- Anchor big resting debris after ~1 s still; client piles below ~0.5 studs/s and 0.3 rad/s held 0.5 s. Settle loot only when slow ~0.15 s and grounded (lowest point within ~0.25 studs of a down-ray hit); first-slow-frame anchoring caught 9 of 22 mid-bounce. Wake settled bodies only for events that can remove their support.
BasePart:BindToCollisionSummaries(2026-10): per-frame callback after simulation withPoint,Normal,RelativeVelocity,Area,Part1per contact patch. Nothing for sleeping-on-sleeping orCanCollide = false. Nothing replicates: subscribe on the owner (the server read ~5 for a 19 studs/s client throw). Impact speed =math.abs(s.RelativeVelocity:Dot(s.Normal)). Validate damage on the server.Enum.CollisionFidelity.Tunable(2026-10) exposesCollisionPrecision(0-1, set in Studio, not by game scripts; default from mesh size). Cheaper:Box,Hull.- A November 2026 wedge collision fix also changed block collisions and broke obby techniques (thread): re-test collision shapes after engine updates.
