Proportional navigation freaking out

https://gyazo.com/e4a3e9d77dcfa22cfac031f51c6e5501
Here is my code (and maybe a poor attempt at creating proportional guidance). I have no idea why sometimes it just freaks out, jitters, or misses and freaks out. Is there a way to make it smoother/not go berserk?

	while true do
		wait(0.001)
		local TTI = (target.Position - lookpart.Position) / lookpart.AssemblyLinearVelocity 
		local hitPos = target.Position + target.AssemblyLinearVelocity * TTI
		lookpart.CFrame = CFrame.new(lookpart.Position, hitPos)
		lookpart.LinearVelocity.VectorVelocity = lookpart.CFrame.LookVector * maxspeed
		if (target.Position - lookpart.Position).Magnitude < 100 then
			lookpart.CFrame = CFrame.new(lookpart.Position, target.Position)
		end
		target.Touched:Connect(function()
			lookpart:Destroy()
			target:Destroy()
			print("HIT!")
		end)
	end	

You can either set the cancollide of the projectile to false, or use something else instead of .touched since alot of devs doesn’t recommend using .touched for fast moving projectiles, instead use something like raycasting to detect objects Infront, example

local bullet = script.Parent
local bulletrayparams = RaycastParams.new()
bulletrayparams.FilterType = Enum.RaycastFilterType.Exclude
bulletrayparams.FilterDescendantInstances = {bullet}

local ray = workspace:Raycast(bullet.Position,bullet.CFrame.LookVector*10,bulletrayparams)

if ray then
print("Has Hit" .. ray.Instance .. "!")
bullet:Destroy()
end

run this on a loop