GUI Sizing/Position Problems

Hello again, how may I fit a GUI on mobile/pc at the same size and position, as in my games I find on diffrent devices my GUIS hang over or are just very very small or big.

Sometimes there legit just broken.
I just want to be able to size a GUI and position a GUI the same on all devices.

1 Like

Use scales instead of the default offsets. Make sure every gui is in scale and there is a plug in I use to help me for this and its free! AutoScale Lite - Roblox

Check your Size

Is it on the Offset or the Scale?

{xScale, xOffset}, {yScale, yOffset}

Not really sure how this useful.

Yes, you can easily use scales, say I wanted a gui to be right in the middle?

gui.AnchorPoint = UDim.new(0.5, 0.5)
gui.Position = UDim2.new(0.5, 0, 0.5, 0)

or if you want it to be a specifc amount of pixels away from a place, like the bottom right corner,

gui.AnchorPoint = UDim.new(1, 1)
gui.Position = UDim2.new(1, -10, 1, -10)

The scale property scales on all devices. I use scales for all my Gui elements in order to scale on all devices. Personally I have never gotten to understand offsets, But I have understand scale and scale does change side depending on the device unlike offsets.

The plugin I linked does this automatically, and you just have to select a gui element. Is there something I am missing?

No, Its just I have never had this issue

Offsets are in pixels. Simple as that. If you said 0, 100, 0, 100, a ui would be positioned/sized x = 100, y = 100. The same goes for negatives.

1 Like

Yes. And I understand that it will be the same size no matter what. But is there really a benefit to use it. Like for example, would there be a case where I wouldn’t want to use scale?

I use it absolutely all the time. it’s extremely important.

1 Like

Interesting. Sorry if I am asking too many questions. But do you ever have issues with devices. That was the main reason why I mostly use scales instead of offsets. If so, how do you fix it for multi-devices?

when your setting the scale of guis you use udim2 which is ({x-scale, x-pixels},{Y-scale,Y-Pixels}) so basically if you set the X scale to 0.5 of a gui.size it would be half the width of the screen (be it phone or computer) where as if you set the x pixels of the udim2 size of a gui it would just make it that many pixels big which 50 pixels on a computer isnt much but on a phone it takes up a lot the screen so if you want continuity use scale

Not really. Unless it has to do with buttons becoming really, really small, or just the Jump Button getting in the way my UIs, I don’t. But if you want to fix it, consider using UIConstraints, because they prevent items from getting too small. When it comes to hanging over, you’ll just have to design your UIs to not overlap each other. Sorry, hope I helped :).