How can I make ragdoll movement like Ragdoll Universe?

Im making a game with ragdoll and I want to attempt something like what Ragdoll Universe has here. I know it has to do with something with constraints but what I have is not cutting it.

Code Im Using That Doesn’t Work Good:

for index, joint in pairs(script.Parent:GetDescendants()) do
	if joint:IsA("Motor6D") then
		local socket ="BallSocketConstraint")
		local a0 ="Attachment")
		local a1 ="Attachment")
		a0.Parent = joint.Part0
		a1.Parent = joint.Part1
		socket.Parent = joint.Parent
		socket.Attachment0 = a0
		socket.Attachment1 = a1
		a0.CFrame = joint.C0
		a1.CFrame = joint.C1
		socket.LimitsEnabled = true
		socket.TwistLimitsEnabled = true

Did you try enabling platform stand?