Hi, was looking through the Roblox TouchJump script and saw this. What does this do exactly?
local minAxis = math.min(screenSize.X, screenSize.Y)
local isSmallScreen = minAxis <= 500 -- Is the screen to small for big mobile buttons?
local jumpButtonSize = isSmallScreen and 70 or 120
It’s basically setting JumpButtonSize either 70 or 120 depending on what the value of isSmallScreen is:
isSmallScreen = minAxis <= 500 - This sets isSmallScreen to true or false depending on screen size
jumpButtonSize = isSmallScreen and 70 or 120
This is a quicker way of writing
if isSmallScreen==true then jumpButtonSize=70 else jumpButtonSize=120 end