Aim Down Sights doesn't center itself properly

I’ve been taking a crack at making a first person gun system without the use of a viewport, and for the past couple of days, I’ve been struggling with the ADS portion of it. I’ve tried multiple methods to calculate the offset, as well as changing the order the offset is applied in to no avail. It’s nowhere close to aligning with the center of the player’s camera.

The gun is a tool, and sports several different animations, so I created an attachment within the mesh of the gun to calculate the ADS offset from. It’s affected by animations as well as mouse sway, both of which presented no issues with other aspects of the gun besides the ADS mechanic itself.

The model of the gun is always attached to the player’s Right Arm through a Motor6D, which allows it to be animated.

local function calc(Offset:CFrame)
				local aimPos = Aim and Aim.WorldCFrame:ToObjectSpace(CamCF) or CFrame.new()
				local targetPos = (CamCF*aimPos)*Offset
				local relativeCF = targetPos:ToObjectSpace(Torso.CFrame)
				return relativeCF:Inverse()
			end
			
			local RCalc,LCalc = calc(OriginalC0["Right Shoulder"]*CFrame.new(1,-1.5,0)),calc(OriginalC0["Left Shoulder"]*CFrame.new(-1,-1.5,0))
			Motors.RShoulder.C0 = Motors.RShoulder.C0:Lerp(RCalc*Sway*AimDirR,0.25)
			Motors.LShoulder.C0 = Motors.LShoulder.C0:Lerp(LCalc*SwayLeft:Inverse()*AimDirL,0.25)

This is a trim of the code I’ve been using, which is responsible for the ADS. The “Aim” variable is set to the ADS attachment once the player aims. It’s part of a larger function bound to RenderStepped.

This is what the gun looks like at ease:


And this is what it looks like during ADS:

As you can see, the Aim attachment is nowhere near aligned with the center of the player’s camera. I’ve offset it far to the right so that the inaccuracy can be better perceived and understood. Any help would be much appreciated.