Trying to position an accessory correctly without attachments

For my accessory editor, I am trying to take player’s accessories, get the MeshPart handle, and add that to their character with only a Motor6D and no attachments. I also have to make sure that the weld only has values in its C1, not its C0.

Any time I try to find a solution to this issue, I always end up with iffy results, mainly in accessories with rotated attachments. Does anyone know a way I can pull this off?

Current Code:

local weld = handle:FindFirstChildWhichIsA("Weld")
local attachment = handle:FindFirstChildWhichIsA("Attachment")

local motor6d = Instance.new("Motor6D")
motor6d.Parent = handle
motor6d.Part1 = character:FindFirstChild(weld.Part1.Name)
motor6d.Part0 = handle
motor6d.C1 = CFrame.fromEulerAnglesXYZ(
	math.rad(-attachment.Orientation.X),
	math.rad(-attachment.Orientation.Y), 
	math.rad(-attachment.Orientation.Z))
motor6d.C1 = CFrame.new(motor6d.C1 * Vector3.new(
	weld.C1.Position.X - weld.C0.Position.X,
	weld.C1.Position.Y - weld.C0.Position.Y,
	weld.C1.Position.Z - weld.C0.Position.Z))
weld:Destroy()
attachment:Destroy()

handle.Parent = character

This code usually works, and only breaks when an accessory has a rotated C0, in which case the accessory will be positioned incorrectly.