RRE Fan Guide

How to Make a Ragdoll in Roblox Studio (R6 and R15)

To make a Roblox character ragdoll when it dies, stop the Humanoid from breaking its joints, then swap every Motor6D for a BallSocketConstraint. One server script does it. Every property name below is checked against Roblox's API reference.

How a ragdoll in Roblox works

A Roblox avatar is held together by Motor6D joints, which lock each part to the animation. By default the Humanoid deletes those joints on death and the parts fall apart. A ragdoll needs the opposite: keep the parts linked, but loosely. So the script:

  1. sets Humanoid.BreakJointsOnDeath to false so the body is not torn apart;
  2. for each Motor6D, places two Attachments exactly where the joint was (its C0 and C1);
  3. links them with a BallSocketConstraint with LimitsEnabled and TwistLimitsEnabled on, so limbs swing but do not spin all the way round;
  4. turns the Motor6D off (Enabled = false) so the physics takes over.

The ragdoll script for Roblox

In Roblox Studio, add a Script (not a LocalScript) to ServerScriptService and paste:

-- Script in ServerScriptService
local Players = game:GetService("Players")

local function ragdoll(character)
	for _, joint in character:GetDescendants() do
		if joint:IsA("Motor6D") and joint.Part0 and joint.Part1 then
			local a0 = Instance.new("Attachment")
			local a1 = Instance.new("Attachment")
			a0.CFrame = joint.C0
			a1.CFrame = joint.C1
			a0.Parent = joint.Part0
			a1.Parent = joint.Part1

			local socket = Instance.new("BallSocketConstraint")
			socket.Attachment0 = a0
			socket.Attachment1 = a1
			socket.LimitsEnabled = true
			socket.TwistLimitsEnabled = true
			socket.Parent = joint.Parent

			joint.Enabled = false
		end
	end
end

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.BreakJointsOnDeath = false
		humanoid.Died:Connect(function()
			ragdoll(character)
		end)
	end)
end)

Press Play, then reset your character (Esc › Reset Character). The body should drop and fold at the joints instead of breaking into pieces. It works for both R6 and R15 because it reads whatever Motor6D joints the rig has.

Tuning it

The pieces, with Roblox's docs

NameWhat it does here
Humanoid.BreakJointsOnDeathKeeps the joints when the character dies (also settable for every player via StarterPlayer.CharacterBreakJointsOnDeath)
Motor6DThe animated joint we switch off; its C0 and C1 tell us where the joint sits
BallSocketConstraintThe loose joint that replaces it; LimitsEnabled, UpperAngle and the twist limits control how far it bends
HumanoidStateType.PhysicsStops the Humanoid from fighting the physics when you ragdoll a living character

Property and function names were checked on November 19, 2026 against Roblox's API dump and Creator Hub reference pages linked above.

Want to see what other developers did with this? The best Roblox ragdoll games list has live player numbers, and ragdoll physics explained covers the theory and other engines.

Questions

Does this ragdoll script work for R6 and R15?

Yes. It loops over every Motor6D the character has, so it handles the 6 joints of R6 and the 15-part R15 rig the same way.

Why does my character fall apart instead of ragdolling?

Humanoid.BreakJointsOnDeath is still true, so Roblox removed the joints before the script could replace them. Set it to false when the character spawns, as in the script.

Should the ragdoll run on the server or the client?

Run it on the server, as here, so every player sees the same body. Physics for a player's own character is usually simulated by that player's device, so the motion can look slightly different for others.