Position problem when working with :WorldToViewportPoint Crosshair

I am having trouble when using :WorldToViewportPoint, what I am trying to achieve is a “dynamic crosshair” that follows the guns muzzle trajectory. I’ve seen a few other people do this in their gun systems but no matter where I look I just cannot find any sort of information about how this is done properly.

The problem is showcased in this video:

Here is the code I am using to offset the Guis’ position to what I want:

local function Update(Object, Attachment : Attachment, DeltaTime : number)
	if not Object.Enabled or Object.Frozen then return end
	local Vector = Camera:WorldToViewportPoint(Attachment.WorldPosition)
	local ScreenPoint = Vector2.new(Vector.X, Vector.Y)
	local FrameSize = Object.MainFrame.AbsoluteSize
	local CenteredPosition = ScreenPoint - Vector2.new(FrameSize.X / 2, FrameSize.Y / 2)
	Object.MainFrame.Position = Object.MainFrame.Position:Lerp(UDim2.new(0, CenteredPosition.X, 0, CenteredPosition.Y), 1)
end

This is used in a RenderStepped function within the module

The “Attachment” is one within the clone of the gun I use for the viewmodel. This module works perfectly and as intended when being used on anything EXCEPT Viewmodels, I suspect it has something to do with the fact that the viewmodels position is continuously moved to the cameras position. But like I said I have seen others do this perfectly so it could be some other issue

Any help is GREATLY appreciated. Thank you