So as you can see by the title I don't know how to explain this, but if I put an if statement like this: if NextFoV == 0 then this works, but if I have this: if NextFoV >= 0 and NextFoV <= 121 then, I can enter in any FoV number and the error catching system won't do it's thing. Thanks!
Addendum; Full code is
if tonumber(InputBox.Text) then
NextFoV = tonumber(InputBox.Text)
-- // Run if ConfirmButton is pressed. \\ --
if NextFoV >= 0 and NextFoV <= 121 then
-- // Check if input is fully numerical. \\ --
-- stuff
else
-- // If input is not fully numerical, run this. \\ --
Err()
end
else
Err()
end
end)

5 comments
It works just fine??
I'm assuming it's something else in the code that's messing it up then, I just added the entire part of the script so you can diagnose what's going on better
nevermind, not sure why but 0 just seemed to break it
^ due to me adding an = so instead it would be >= so yeah I'm stupid
Try math.clamp instead. I also have something similar to what you're trying to achieve on this post https://scriptinghelpers.org/questions/99315/how-do-i-change-a-players-fov-field-of-view