Modifing a CFrame's position in straight lines

What I want to happen is that the user’s left arm moves in straight lines to each cordinate, similar to the way you move limbs when you animate in Roblox Studio too.

When I multiply the user’s arm’s Motor6D’s CFrame by another one:

Dude.Torso["Left Shoulder"].C0 = Dude.Torso["Left Shoulder"].C0 * CFrame.new(0, 0, 1)

It changes its position based on each side of the arm, which might move it in diagonal directions if it’s angled.

I also tried summing it to Vector 3’s:

Dude.Torso["Left Shoulder"].C0 = Dude.Torso["Left Shoulder"].C0 + Vector3.new(0, 0, 1)

But it moves it globally, which means it may move it to any of its directions without mattering where it’s facing (Say, if the user is facing forwards the arm moves backwards, but if they’re facing to its left the arm moves to the left too).

I ran out of ideas. Any solution or workaround is greatly welcomed.

This line of code you wrote is always going to move the position of C0 1 stud along the direction of C0.LookVector. Or more precisely -C0.LookVector, as LookVector is a bit of an odd man out in that it’s the -Z direction, where as Right and Up are +X and +Y respectively.

If you want the CFrame to move 1 stud in the World Z direction, the multiplication order would be reversed:

Dude.Torso["Left Shoulder"].C0 = CFrame.new(0, 0, 1) * Dude.Torso["Left Shoulder"].C0

This is the same as adding Vector3.new(0,0,1)

So the question is: if you don’t want it to move in local joint space Z, or world Z, what coordinate space are you actually wanting to reference? If the answer is the Model space, i.e. the coordinate frame of the HumanoidRootPart, then I think you need:

Dude.Torso["Left Shoulder"].C0 = hrp.CFrame * CFrame.new(0, 0, 1) * hrp.CFrame:Inverse() * Dude.Torso["Left Shoulder"].C0