How do I make a ragdoll for r6?

I want to make a ragdoll for r6 but I have no idea how to
I looked over the devforum and I only found people directing me to other scripts that I couldn’t understand

I want to make my own ragdoll and understand how it is made

Well first do you understand how constraints work? They control the physics of the ragdoll. I suggest trying it out in studio and try it out yourself if you haven’t.

Now to apply to R6 you will need to create the attachments for these constraints to work while disabling the motor6D s.

For the purpose of creating the attachments I left a function in my CCDIK module to help setup those attachments.

function commandBarSetupRigAttachments(model)
	local modelDescendants = model:GetDescendants()
	for _, motor6D in pairs(modelDescendants) do
		if motor6D:IsA("Motor6D") then
			--In order to find the joint in world terms
			local motor6DName = motor6D.Name
			local AxisAttachment = Instance.new("Attachment")
			AxisAttachment.CFrame = motor6D.C0
			AxisAttachment.Name = motor6DName .. "RigAttachment"
			AxisAttachment.Parent = motor6D.Part0

			local JointAttachment = Instance.new("Attachment")
			JointAttachment.CFrame = motor6D.C1
			JointAttachment.Name = motor6DName .. "RigAttachment"
			JointAttachment.Parent = motor6D.Part1
		end
	end
end

This will position the attachments at the rig joints like the neck or shoulders between the two parts.

You can visualize how it looks like by viewing the tree diagram using a plugin like rig edit lite to view the characters joints.

If you want to know how the CFrame math works and why it works, umm sorry it’s 12 am here hopefully someone else can help out. The key word.is CFrame offset which is what C0 represents (C0 represents CFrame offset from Part 0)

Disclaimer: this doesn’t guarantee it will look good as R6 as it’s joints weirdly positioned in my opinion. But y’know try it out.

2 Likes