How to move or rotate a Motor6D in a certain direction regardless of transform from animations?

in my game, i have made it so the player’s arm moves with the camera movement for a visual effect.

this is the code i have written to do that:

local mouseDelta = InputService:GetMouseDelta()/100
rightShoulder.C0 = rightShoulderOriginalC0 * CFrame.Angles(0, -mouseDelta.X*4, -mouseDelta.Y*4)

this just rotates the shoulder with the movement of the camera
it works, but looks bad whenever an animation that changes the arm’s rotation is playing, because the rotation is affected by the transform from the animation.

so, for example, if an animation twists rotation the arm on its Z axis 90 degrees, then the mouseDelta.X would now rotate the arm up and down instead of left and right

i can not think of a way to fix this no matter how hard i try. any help is appreciated, thank you