Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i fix a gui that is to big on mobile?

Asked by 5 years ago
Edited 5 years ago

Im working on a game that includes a shop gui. When i play on pc it looks fine. When i play on mobile it looks ugly. Heres a photo to show what i am talking about: http://imgur.com/uiczLXt

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

GuiObjects have two Size / Position Properties Associated with the X-Axis and Y-Axis named "Scale" and "Offset".

Offset refers to pixel size which are best compared on a Computer / PC screen

Scale refers to the object's size relative to its parent.

If you want your Gui to look nearly the same on all devices, you have to make sure the Size proportions are Scale only. For Example:

script.Parent.Position = UDim2.new(1, 0, 1, 0)

In the above example, the scale property is 1 * 100% (100%) of the size of the GuiObject's parent.

Another thing to check is to make sure that if your Gui involves any TextButtons / TextLabels / TextBoxes that the TextScaled Property is set to true.

In the Properties Window, the above set-up would look like:

{1, 0}, {1, 0} 
0
Ok the size would fit the device but the widith of the size changed Dalbertjdplayz 37 — 5y
0
Using scalar will make the gui be altered for each device window size, this is to optimize it, so the width should change. Use the Current Offset Pixels divided by the AbsoluteSize of the Window for the most comparable percent change SerpentineKing 3885 — 5y
0
Ok got it Dalbertjdplayz 37 — 5y
Ad

Answer this question