Ragdoll system not working properly

Hi developers.
Today while i was making a ragdoll script for my game, once it was finished, I ran into a problem. The joints werent breaking and everything was going good until O realized it didnt really ragdoll. They player fell in a rigid position which looked akward, arms nor legs moved. I will leave the script here in case someone detects an error on it, Thank you!
RAGDOLL SCRIPT ON STARTER CHARACTER SCRIPTS
local humanoid = script.Parent:WaitForChild(β€˜Humanoid’)

humanoid.BreakJointsOnDeath = false 

humanoid.Died:Connect(function()
	for index,joint in pairs(script.Parent:GetDescendants()) do 
		if joint:IsA('Motor6D') then 
			local socket = Instance.new('BallSocketConstraint')
			local a1 = Instance.new('Attachment')
			local a2 = Instance.new('Attachment')
			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:Destroy()
		end
	end
end)

Try reading this post, it might help.
Happy cake day, by the way! :slight_smile: :birthday:

Thanks! i thought no one would realize xD

1 Like


I tried to help my self with some of the replies i found but my player still falls like a wood plank. Maybe this video could help in some way.

1 Like

after reviewing the topic you sent, I found the solution! Thanks!

1 Like

Just got back online, glad it helped! Have an amazing rest of your day/night!