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

Why are my Gui's Positioned Differently When im on different duvices [HELP!]?

Asked by
Tizzel40 243 Moderation Voter
5 years ago
Edited 5 years ago

ok... ok... so basically when I was making my Wielding Simulator game Online, I was making my guis like

.the energy bar gui

.the shield bar gui and

.the Stamina bar gui

now when I position the gui's, I use the "UI Editor" of scaling and I scale its size and position their...

Next thing I know I test it on my PC and the Gui's are positioned beautifully...

but... when I use a smaller ar other bigger device, the gui's are compacted together or simply have been separated for some reason...…..

so WHAT is the reason for my GUI's being Presented Differently for other devices!?

Why is this happening?

and also , how can I prevent this and have it scaled all equally so it can look the same on each device no matter how big or small it is like the GUI's in Jailbreak or MAINLY in other games too?

someone please help me...…….

https://gyazo.com/bdb09812e73e582dbe13e14db6e6ae99

--T40

0
have you tried setting all your gui's to UDim2.new(x,0,y,0) instead of UDim2.new(0,x,0,y)? 100% helps. greatneil80 2647 — 5y
0
oh yes see Tizzel40 243 — 5y

1 answer

Log in to vote
1
Answered by
OBenjOne 190
5 years ago

change the other side of the size and scale values. They are formatted (I think) something close to this:

[(A,B) (C,D)] 

I know there are four numbers anyway. You probably have A and C changed to numbers like 200 or 150 for your gui, what these numbers do is change the size of the gui, with no regard to the size of the user's screen. What you should probably do is set these numbers to 0 and work with numbers B and C. These change the size of the gui depending on the size of the user's screen. if you set these numbers to 1, they will take up the whole screen. Set them to 0.1 and they will take up 1/10 of the screen, regardless of the player's device.

You may need to change this a bit, I haven't done anything with programming for a few months but at least this is the general idea.

0
I think A and C change the number of pixels the gui is across. OBenjOne 190 — 5y
0
oh! A anc C might be switched with B and D but use the ones you haven't worked with yet! OBenjOne 190 — 5y
0
It appears from their screenshot that they are using the offset instead of scale values(B,D in this case). For future reference A and C are the values that will "fill up the screen" xEmmalyx 285 — 5y
Ad

Answer this question