How to get players distance and tween camera farther away?

	for i, player in ipairs(game.Players:GetChildren()) do
		if player.Name ~= game.Players.LocalPlayer.Name then
			local distance = (hrp.Position - player.Character.HumanoidRootPart.Position).Magnitude
			if player.Character.HumanoidRootPart.Position > distance then
				cam.CFrame = cam.CFrame:Lerp(CFrame.new(hrp.Position + Vector3.new(0, 2.5, 15), hrp.Position), .1)
			end
		end
		
		
	end

im trying to tween the camera farther out when your player is farther away from the others
the script above is what ive tried but it just errors (attempt to compare vector3 with number)

What exactly do you mean by tweening the camera?

so i have 2 players in an area and when one moves farther away from the other i want their camera to zoom out so they can still see the area their in