Pivoting attachment around character's HumanoidRootPart

There’s lots of posts on the DevForum about making 1 part pivot around another part, but I’m having some issues doing the same thing with an attachment due to its unique position properties.

The picture above is my game, where the camera’s CFrame is determined by the attachment’s CFrame. I want the attachment to pivot around the HumanoidRootPart whenever the player moves their mouse left/right. Here is the function I have created for that:

	local rotationSens = 1
	local movement = inputObject.Delta.X * rotationSens
	
	local PivotPoint = hrp.Position
end

The variable “movement” is a number which should determine how far the attachment pivots to the left/right