Game GUI is different on multiple devices

Hello!
I was making my GUI on my game, and, saw that it is really big for phones users:

- Average Laptop User:
image

- iPhone 4S User:

How could I make something that changes the size of the UI to fit a device if it’s too big and if it fits, to not change anything. I tried putting UIAspectRatioConstraint but it affects every device, even the ones where the GUI isn’t big. Thanks!

you use pixels and not scale

look in the size properties, instead of using ex. 300 pixels use 0.1 scale (just an example)

I recommend looking into AutoScale Lite - Roblox

Do the Size of the TextLabels to 0.1,0,0.05,0 and the problem has appeared because you did 0,170,0,80.

If you use 1920x1080, that you used 0,192,0,54, so, it does 0.1,0,0.05,0.

On mobile, per example, the UI is like 1080x2160, it’s still 108,0,108,0 (Oh what a perfect one.) to be exact, it’s 0.1,0,0.05,0.

image
its like percent, 1 = 100%

Hm I didn’t quite understand, let me show you my Frames:
image
This is for the cash frame (the green one)
Here are the sizes:
image
image
image

Yes, I know that, but it affects all devices right? Like if I put 0.5, 0, 0.1, 0 it’ll affect the devices even if I don’t want to.

mm? so you want different size on different devices?,

Yes, on phone the UI is way too big but for PC users it’s good. I just want to have a different size based on the device size.

Do 1.048,0,1.34,0 instead of 0,220,0,40 for the CashFrame.

0.109,0,0.016,0 for the Cash’s Parent which is the Stats.

1,0,1,0 for the Cash which their Parent is Cash.

And do it for every other frames.

but if you set size to {0.1, 0}, {0.1, 0} size will automatically be 0.1 of player screen, …


1 Like

Oh yeah, I don’t know why but it wasn’t doing that before, ima play with numbers to find the perfect size thanks

2nd value of the size (offset) need to be 0
image

It’s better to use UIAspectRatioConstraint

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.