How to unragdoll?

I made this ragdoll script:

for _, joint in pairs(targetCharacter: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

but was wondering how to un-ragdoll the player and get them back on their feet.

I have no idea how to make this. Please help.

I have used modules found on DevForum for ragdolling. They handle it by storing all the joints prior to destroying, so they can re-instance them again.

1 Like
1 Like

Managed to make it work. Thanks everybody for taking your time to respond

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.