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