R6 ragdoll looks choppy when doing ragdoll things

I’m making a R6 and R15 ragdoll script & the R6 characters don’t like me for some reason :frowning:

I’ve tried setting the network owner to the server & it still does not work.

R6 = {
		Neck = {
			script.Parent.Joints.R6.Neck,
			Vector3.new(0, -0.5, 0),
			Vector3.new(0, 1, 0)
		},
		
		Shoulder = {
			script.Parent.Joints.R6.Shoulder,
			Vector3.new(-0.5, 1, 0),
			Vector3.new(1, 1, 0)
		},
		
		Hip = {
			script.Parent.Joints.R6.Hip,
			Vector3.new(0, 1, 0),
			Vector3.new(0.5, -1, 0)
		}
	}


local function Connect(limbA: BasePart, limbB: BasePart, joint: Instances, invert: boolean)
	
	local Attachment0 = Instance.new("Attachment")
	Attachment0.Parent = limbA
	Attachment0.Name = joint[1].Name
	if (invert == true) then
		Attachment0.Position = Vector3.new(-joint[2].X, joint[2].Y, joint[2].Z)
	else
		Attachment0.Position = joint[2]
	end
	Attachment0.Orientation = Vector3.new(0, 0, 0)
	
	local Attachment1 = Instance.new("Attachment")
	Attachment1.Parent = limbB
	Attachment1.Name = joint[1].Name
	if (invert == true) then
		Attachment1.Position = Vector3.new(-joint[3].X, joint[3].Y, joint[3].Z)
	else
		Attachment1.Position = joint[3]
	end
	Attachment1.Orientation = Vector3.new(0, 0, 0)
	
	local j : Constraint = joint[1]:Clone()
	j.Attachment0 = Attachment0
	j.Attachment1 = Attachment1
	j.Parent = limbB
	
end

function RigManager.RigR6(Character : Model, Humanoid : Humanoid)
	print("Character is R6")
	local AttachmentPoints = RigManager.R6
	local Torso : BasePart = Character:FindFirstChild("Torso")
	Humanoid.RootPart.CanCollide = false
	
	Connect(Character:FindFirstChild("Head"), Torso, AttachmentPoints.Neck, false)
	Connect(Character:FindFirstChild("Right Arm"), Torso, AttachmentPoints.Shoulder, false)
	Connect(Character:FindFirstChild("Right Leg"), Torso, AttachmentPoints.Hip, false)
	Connect(Character:FindFirstChild("Left Arm"), Torso, AttachmentPoints.Shoulder, true)
	Connect(Character:FindFirstChild("Left Leg"), Torso, AttachmentPoints.Hip, true)
end

Honestly the networking and physics/constraint details of ragdolling is pretty messy. I’d personally just use a module.

I can’t really see the problem in the video but changing the ownership from the client to server usually results in a little discontinuity in the movement, so I’d try to keep the ownership of the character on the client.

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