Ragdoll not working properly (HumanoidRootPart won't fall)

Hello,

I’ve wrote a similar topic before and found a temporary solution, but the same problem arises. I am not able to make players ragdoll for the life of me, and their bodyparts will ragdoll, but the humanoidrootpart will not fall. Weirdly, this works on dummies, but not players. Here is my module that should ragdoll, but won’t.

function UltraModule:Ragdoll(Humanoid: Humanoid,Duration)
	Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
	Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
	Humanoid.Parent.HumanoidRootPart.CanCollide = false
	Humanoid.Parent.HumanoidRootPart.Anchored = false
	Humanoid.RequiresNeck = false
	Humanoid.AutoRotate = false
	for index,joint in pairs(Humanoid.Parent:GetDescendants()) do
		if joint:IsA("Motor6D") then
			local socket = Instance.new("BallSocketConstraint")
			local a1 = Instance.new("Attachment")
			local a2 = Instance.new("Attachment")
			a1.Name = "RagdollAttach"
			a2.Name = "RagdollAttach"
			a1.Parent = joint.Part0
			a2.Parent = joint.Part1
			socket.Parent = joint.Parent
			socket.Attachment0 = a1
			socket.Attachment1 = a2
			a1.CFrame = joint.C0
			a2.CFrame = joint.C1
			socket.LimitsEnabled = true
			socket.TwistLimitsEnabled = true
			joint.Enabled = false
		end
	end
	if Duration then
		task.delay(Duration,function()
			for index,joint in pairs(Humanoid.Parent:GetDescendants()) do

				if joint:IsA("BallSocketConstraint") or joint.Name == "RagdollAttach" then
					joint:Destroy()
				end
			end
			for index,joint in pairs(Humanoid.Parent:GetDescendants()) do
				if joint:IsA("Motor6D") then
					joint.Enabled = true
				end
			end
			Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
			Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
			Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
			Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
			Humanoid.RequiresNeck = true
			Humanoid.AutoRotate = true
		end)
	end
end

If you need any more info, please ask. I am so tired of getting this same bug everytime in every game I want a ragdoll in.

2 Likes

Nevermind, I was wrong with it working on dummies. It infact doesn’t work on anything.
image_2024-06-06_213754474
The humanoidrootpart just won’t ragdoll.

The network owner must set the humanoid state. By default, the player is the network owner of their character. The dummies may also be network-owned by the player if the player is near them.

So you’ll need to check whether the character is network owned by the server or a client. If it’s owned by the server, change humanoid state on the server. Otherwise, use a RemoteEvent to ask the network owner client to change the humanoid state.

Hello,

I’ll try this solution in a little, but I ended up figuring out a decent solution: PlatformStand to true, and not using any humanoid states.