I recently made a script that checks if a player’s ViewportSize on the X and Y axis is a certain size.
For some reason the greater than operator doesn’t seem to be working while the less than operator does work.
I’m not sure if what is wrong with the script. There are no errors.
local function DeviceType(PlayerDevice)
if PlayerDevice == Touch and game.Workspace.Camera.ViewportSize.X > 800 and game.Workspace.Camera.ViewportSize.X > 401 then -- > Operator doesnt seem to work
TextSize = 18.5 -- Confirm The player is on ipad/tablet
print("Works?")
end
if PlayerDevice == Touch and game.Workspace.Camera.ViewportSize.X < 799 and game.Workspace.Camera.ViewportSize.Y < 399 then -- < Does seem to work
TextSize = 10.5 -- Confirm player is on a phone
print("Works?")
end
end
