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

Problems in fitting Guis in different devices, please someone?

Asked by
XDvvvDX 186
4 years ago

Hello. I've started working on my own new project, for almost a week. I've made almost everything, but then I realized, I fell for my biggest enemy. The GUIs position will be absolutely different in any device and I become confused. It also blamed me from continuing my last project, that's why I started this one. If someone can react to me and tell me how I fit my GUIs for all the devices, or at least for one type (PC, Mobile etc...). I'm working on heavy projects and that's what always makes me fall. It will be very appreciated from you to answer. Thank you, XDvvvDX.

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Have you noticed how UDim2 values (Size, Position of guis) have 4 numbers? They consist of ScaleX, OffsetX, ScaleY, OffsetY. Scale is the percentage of how much space it takes up on the screen or percentage of where the position starts represented by a decimal from 0 to 1, and offset is an amount of pixels. Now obviously scale is usually better since it looks the same on all screens. An easy way to automatically convert offset to scale is to use this plugin, by clicking on a gui object and clicking scale for both position and size.

Reply with further questions,

and please mark as correct if this solution works for you!

0
There’s a plug-in?!!!! All this time I wasted setting offset to 0 and scaling.... SethHeinzman 284 — 4y
0
Thank you much appreciated. XDvvvDX 186 — 4y
0
Well, it works kind of. XDvvvDX 186 — 4y
0
But still.. it won't fit for all devices so well. I used the plugin and it's still not fit so well.. can you tell me maybe what did I do wrong? Thanks, XDvvvDX. XDvvvDX 186 — 4y
0
The problem might be that it's too big on certain devices. There should be a UI size constraint option on the plugin, try using that for your gui elements. RaforawesomeAlt 343 — 4y
Ad

Answer this question