Limit of increase and decrease of += 1 and -= 1

Hi, I want to add an increase and decrease limit of += 1 and -= 1. I want to do it with DiagonalFieldOfView but I don’t know how to do it in reality.

local ViewPortFrame = script.Parent:WaitForChild("Minimap2")
local mouse = script.Parent

local cam = Instance.new("Camera")
cam.Parent = script.Parent.View
cam.CameraType = Enum.CameraType.Scriptable
cam.DiagonalFieldOfView = 3
ViewPortFrame.CurrentCamera = cam

function MasTransparency ()
cam.DiagonalFieldOfView += 0.1
end

function MenosTransparency ()
cam.DiagonalFieldOfView -= 0.1
end

mouse.MouseWheelBackward:Connect(MasTransparency)
mouse.MouseWheelForward:Connect(MenosTransparency)

Before adding or subtracting 0.1 you should do a check to see if it isn’t over/under the limit.

function MasTransparency ()
    if cam.DiagonalFieldOfView < 50 --[[change 50 to what you want the max to be]] then
        cam.DiagonalFieldOfView += 0.1
    end
end
function MenosTransparency ()
    if cam.DiagonalFieldOfView > 0 --[[change 0 to what you want the minimum to be]] then
        cam.DiagonalFieldOfView -= 0.1
    end
end