Camera head-lock + realistic offset [first person, game is third person aswell] not working properly

Hey guys, I’m struggling to make realistic-first person camera offset. Camera locks on head but the moment I want to set camera little forward so its not like this:


Camera just moves to side like this:


Basically, the camera is not locked to the head properly and floats around as its moved

here’s code for camera head lock

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
repeat wait()
	
until player and char
wait(1)
local Humanoid = char:WaitForChild("Humanoid")
local Head = char:WaitForChild("Head")
local RootPart = char:WaitForChild("HumanoidRootPart")
game["Run Service"].RenderStepped:Connect(function()
	Humanoid.CameraOffset = Humanoid.CameraOffset:Lerp((RootPart.CFrame+Vector3.new(0,1.5,-1)):pointToObjectSpace(Head.CFrame.p),0.5)
end)

if anyone can help me or atleast try, I’d be happy as I struggled for over a month now

Firstly, the line of code above is useless . This is because if plr.Character is nil , it would go to the or statement which says plr.CharacterAdded:Wait()

I assume you want to make the camera to be so called floating/lagging around when moving? If so , you can use HumanoidRootPart.AssemplyVelocity or you can use Humanoid.MoveDirection