Okay, so I have some Text Buttons in my game and when I went on my phone to test my game, the buttons took up most of the screen. I have seen in other games that the buttons automatically scale themselves to fit the screen appropriately. I would just like to know how to adjust the buttons to the screen. Thanks in advance! :D
GUI uses UDim2 which is much different then something such as Vector2. The first parameter is the fixed X value (in pixels), while the second parameter is a value that will be multiplied by the screen’s resolution to get the X value. Repeated with the Y as well. If both parameters have numbers then the end result will be added together. This will allow the GUI to scale correctly with different resolutions. In the following examples the screen’s resolution is 1024x768.
Ex.
{0, 0.5},{0, 0.5}
This will output a Vector2 of 512x384 with the given resolution
{100, 0.5},{200, 0.5}
This will output a Vector2 of 612x584 with the given resolution