My camera being not smooth

so this code i made is supposed to follow the character model smoothly.
but it looks kinda choppy

local posPrev=Vector3.zero

game:GetService("RunService").Stepped:Connect(function()
	workspace.CurrentCamera.CameraType=Enum.CameraType.Scriptable
	local character:Model=nil
	for _,i in pairs(workspace.characters:GetChildren()) do
		if i:GetAttribute("ownerID")==tostring(game.Players.LocalPlayer.UserId) then
			character=i
		end
	end
	
	if character==nil then
		return
	end
	local dist=character:GetAttribute("viewDistance")  --this attribute determines how far player can see
	posPrev+=(character.PrimaryPart.Position-posPrev)/10
	if character then
		workspace.CurrentCamera.CFrame=CFrame.lookAt(posPrev+Vector3.new(0,10,-5)*dist,character:GetPivot().Position)
	end
	
	
	
end)

I’m no expert in analyzing other’s code. But I feel like you’re adding value to the camera’s position so it budges

posPrev+=(character.PrimaryPart.Position-posPrev)/10
	if character then
		workspace.CurrentCamera.CFrame=CFrame.lookAt(posPrev+Vector3.new(0,10,-5)*dist,character:GetPivot().Position)
	end

In which case, I believe if you reduce the value of the value added to the camera it should be less choppy