How to make a camera zoom in on something far away and zoom in when it comes closer

Hey, I have this code where it locks onto a certain part, and what I want it to do is to zoom in as the object gets farther away, but as it gets closer, zoom out.

camera.FieldOfView = math.clamp(math.abs((cameras.Race_Cams.Cam3.Position - carmodels[1].Body.D1_TV_SUBJECTS.Middle.Position).Magnitude / 30), 10, 60)

Instead, it does the opposite. How can I fix this?

Another thing, I have another part to the script where the camera locks onto a part using:

camera.CFrame = CFrame.new(cameras.Race_Cams.Cam3.Position, carmodels[1].Body.D1_TV_SUBJECTS.Middle.Position)

But it is very choppy and I do not know how to fix it. (0:20 in the video shows both of my issues)

https://streamable.com/rub5b6

Try using the TweenService to tween the cameras CFrame.

Honestly, with my experience using TweenService, I dont think it would work like that. The Subjects are constantly moving

If they are constantly moving then you could possibly weld a part a few studs off the car, then change the CameraSubject to the part.