How to make Ragdoll r6 not on death

How to make Ragdoll r6 not on death i tried to disable the player moter6d and then add a attachment

script.Parent.Humanoid.BreakJointsOnDeath = false
script.Parent.Humanoid.RequiresNeck = false
for index, joint in pairs(script.Parent:GetDescendants()) do
	if joint:IsA("Motor6D") then
		socket = Instance.new("BallSocketConstraint")
		a1 = Instance.new("Attachment")
		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.Enabled = false
		script.Parent.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
		script.Parent.Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
	end
end	

Then this happens

3 Likes