Ragdoll System Error

Hey, im trying to make a ragdoll System for my game and im strugling because of these Cframes for the limbs to collide:

local offsets = {
	Head = {
		Joint = "Neck",
		CFrame = {
			CFrame.new(0, 1, 0, 0, 1, 0, 0, 0, 1),
			CFrame.new(0, -0.5, 0, 0, -1, 0, 0, 0, 1) 
		}
	},
	HumanoidRootPart = {
		Joint = "HumanoidRootPart",
		CFrame = {
			CFrame.new(0, 0, 0, 0, 0, 1, 0, 0, 0), 
			CFrame.new(0, 0, 0, 0, 0, 1, 0, 0, 0) 
		}
	},
	["Right Arm"] = {
		Joint = "Default",
		CFrame = {
			CFrame.new(1.3, 0.75, 0, 1, 0, 0, 0, 1, 0), 
			CFrame.new(0.2, 0, 0.75, 0, -1, 0, 0, 0, 1)
		}
	},
	["Left Arm"] = {
		Joint = "Default",
		CFrame = {
			CFrame.new(-1.3, 0.75, 0, -1, 0, 0, 0, 1, 0),
			CFrame.new(-0.2, 0, 0.75, 0, -1, 0, 0, 0, 1)
		}
	},
	["Right Leg"] = {
		Joint = "Default",
		CFrame = {
			CFrame.new(0.5, -1, 0, 1, 0, 0, 0, -1, 0),
			CFrame.new(0, 1, 0, 1, 0, 0, 0, -1, 0)
		}
	},
	["Left Leg"] = {
		Joint = "Default",
		CFrame = {
			CFrame.new(-0.5, -1, 0, -1, 0, 0, 0, 1, 0),
			CFrame.new(0, 1, 0, 1, 0, 0, 0, -1, 0)
		}
	}
}

return offsets

Invalid number of arguments: 9 - Server - RagdollData:5

how can i fix this while keeping the values ?

Okay so what you are doing right now is using CFrame.new(), but you have 9 arguments. For your scenario, you want to set the Rotation Matrix, but you also have to have a position vector. So the first 3 arguments are the position vector, and then the 9 after those are the rotation matrix. Within the 9 rotation matrix arguments, the first 3 are the RightVector, the next 3 are the Y vector, and the last 3 are the ZVector.

So basically, you should have 12 arguments in the CFrame if you want to set every rotation matrix vector. I don’t really understand it, BUT how about you try to add 3 more numbers at the start of every CFrame for the position vector. So add 0, 0, 0 for every CFrame. I’m not sure if it will work because I don’t know CFrames that well, but worth a try.

thanks, i will try that rn, if it works, ill put you in the solution

i forgot 3 values on each of them

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