Motor6D's C0 CFrame not changing correctly

  1. What do you want to achieve? Keep it simple and clear!
    The Motor6D’s C0 CFrame should point to the humanoidRootPart.
  2. What is the issue? Include screenshots / videos if possible!
    Currently, the Motor6D’s C0 CFrame only changes the y axis’s orientation by only a few degrees
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried using alignOrienation before realizing that wasn’t the ideal the solution.
local ObjectsToRotate: {string} = {
				"Cylinder",
				"Base",
				"Head"
			}
			
			if Root and Target.PrimaryPart then
				for i, v: Instance in pairs(ObjectReference:GetChildren()) do
					if v:IsA("BasePart") and table.find(ObjectsToRotate, v.Name) then
						local Motor : Motor6D = Root:FindFirstChild(v.Name) :: Motor6D
						
						if Motor then
							local Orignal = CFrame.lookAt(Motor.C0.Position, HumanoidRootPart.Position)
							local x, y, z = Orignal:ToOrientation()
							local rx, ry, rz = Motor.C0:ToOrientation()
							local YCFrame: CFrame = CFrame.new(Motor.C0.Position) * CFrame.Angles(rx, y, rz)
							Motor.C0 = YCFrame
						end
					end
				end
			end
1 Like