Can't assign motor6d C0's Position AND Rotation offset

Hello!
I’m making a system that attaches a part to the players arm with an offset to make it fit correctly.

When i tried to assign the Position, It worked. But as soon as i tried doing that to the rotation aswell, It broke!

I’ve provided the code here:

function makeWeld(arm, p0, p1)
	local gloveWeld = Instance.new("Motor6D")
	gloveWeld.Name = "Glove6D"

	gloveWeld.Part0 = p0
	gloveWeld.Part1 = p1
	
	gloveWeld.C0 = CFrame.new(-0.2, 0, 0)
	gloveWeld.C0 = CFrame.Angles(math.rad(0), math.rad(-180), math.rad(-180))
	
	gloveWeld.Parent = arm
end

Am i missing something?

Any help is greatly appreciated!

Why not combine these two and try?

gloveWeld.C0 = CFrame.new(-0.2, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-180), math.rad(-180))
2 Likes

Thank you! I should have seen this :man_facepalming:

1 Like

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