Issues with my ragdoll system

What I’m trying to do:

Achieve a ragdoll system where I can pick up or execute a player, and let them get up after a certain time( like in gpo)

What the problem is:

my script doesnt ragdoll the character, theres no limbs moving or rotating its all stiff unlike what I scripted it to do.

This is the script:

	hum.Health = 0
		hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, true)
		hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)

		local RunService = game:GetService("RunService")
		hum:ChangeState(Enum.HumanoidStateType.FallingDown)
	
		for i,v in pairs(char:GetChildren()) do
			if v:IsA("Part") and v:FindFirstChildOfClass("Attachment") and v.Name ~= "HumanoidRootPart"  then -- v is the part u wanna rotate
				local A = Instance.new("Attachment",v) -- Attachment on the target
				local B = Instance.new("Attachment",humrp) -- attachment on the unused, humanoid rootpart not affecting by animations
				A.WorldPosition = B.WorldPosition
				local BS = Instance.new("BallSocketConstraint",v) -- joint basically, to rotate on
				BS.Attachment0 = A
				BS.Attachment1 = B
				BS.TwistLimitsEnabled = true
				BS.LimitsEnabled = true	
				BS.Restitution = 0
				BS.UpperAngle = 90
				BS.TwistLowerAngle = -90
				BS.TwistUpperAngle = 90
				table.insert(Attachments,A)
				table.insert(Attachments,B)
				table.insert(balls,BS)
				
			end	
		end	
		
		for i,v in pairs(motors) do
			if v.Name ~= "Neck" then
				v.Enabled = false
			
		end
		end

		humrp.Velocity = humrp.CFrame.lookVector*10+Vector3.new(0,1,0)
		done = true

It uses a ball socket constraint, I’m trying to make the limbs rotate and stuff

What I’ve tried:

I’ve tried looking at other ragdoll scripts and seeing what’s wrong but nothing so far. I’ve tried modifying the properties on the ball socker constraint but nothing changes, I’ve tried setting the limbs to cancollide off but the problem still persists.

1 Like

You need to disable the Motor6D joints in the character model. What I’d recommend doing is doing a GetDescendants loop of the Character and if the class is a Motor6D, disable the joints and create a ball/socket. This way it’ll work for R6 and R15 too.

(Side note, ChangeState needs to be called on a client. You’ll also need to set Humanoid.RequiresNeck to false)

I already disabled all the motor6d joints and created the b.s i also am using the script on the client, it makes no difference on the server and its for testing purposes right now

fixed just had to add velocity