I can't find out a way to make the position to be relative to the LookVector

So, to simplify, I use this script to add a magnitude spring value between the old and new positions of the NeckAttachment, and I add that spring value to the Viewmodel.

  •   NewNeckPos = NeckAttachment.WorldCFrame.Position
      
      local Diffirent = NewNeckPos-OldNeckPos
      
      VMMovementSpring:shove(Diffirent)
      
      local UVMMovementSpring = VMMovementSpring:update(dt)
      
      OldNeckPos = NeckAttachment.WorldCFrame.Position
      
      Framework.Viewmodel:SetPrimaryPartCFrame(Camera.CFrame
      	* CFrame.new(UVMMovementSpring.X,-UVMMovementSpring.Y,UVMMovementSpring.Z)
      	* CFrame.Angles(-UVMMovementSpring.Y,-UVMMovementSpring.X,UVMMovementSpring.X)
      )
    

The problem is that it only works when the player looks forward because the position value is global and doesn’t follow the look vector. I had tried to multiply the new and old value with the look vector, but it doesn’t work

My way of doing this is to shove the magnitude difference of the new and the old Value, I think maybe there’s a way to make the Position of the neck attachment follow the look Vector

Since no one helped me, I found the solution, so I’ll post my solution here

local NewNeckPos = Character.Torso.NeckAttachment.WorldCFrame.Position
local WorldDelta = NewNeckPos - OldNeckPos

	local LocalDelta = Character.Torso.CFrame:VectorToObjectSpace(WorldDelta)
	
	VMMovementSpring:shove(LocalDelta)
	local UVMMovementSpring = VMMovementSpring:update(dt)
	
	OldNeckPos = NewNeckPos
	
	Framework.Viewmodel:SetPrimaryPartCFrame(Camera.CFrame
		* CFrame.new(USwaySpring.X,-USwaySpring.Y,0)
		* CFrame.Angles(-USwaySpring.Y,-USwaySpring.X,-USwaySpring.X)
		* CFrame.new(UVMMovementSpring.X/2, -UVMMovementSpring.Y, UVMMovementSpring.Z)
		* CFrame.Angles(-UVMMovementSpring.Y, -UVMMovementSpring.X/2, -UVMMovementSpring.X)
		* UpdatedSwayCF
	)