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)