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

GUIs centered on studio but not ingame, do I need some kind of script to fix this?

Asked by
Lualaxy 78
6 years ago

I use the GUI moving/scaling tool on roblox studio, its showing that it's centered on the preview and its showing the lines that help center the GUIs. What can I do for the GUIs to center properly? Do I need some kind of script?

0
No, don't need script Leamir 3138 — 6y
0
What do I do then? Lualaxy 78 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

1) This is not a scripting problem

2) Don't use plugins/tools

The problem is that you're probably using offset and not scale. The difference is that offset can change a lot depending on screen size and scale cannot {scaleX,offsetX},{scaleY,offsetY}

How it works, scale works from 0 - 1 0.5 is the middle, this is like this in both position and size, to set something in the middle of your screen you'll have to do this {0.5,-sizeX},{0.5,-sizeY}

Or if you are working with both size and position scale... {1-sizeX/2, 0},{1-sizeY/2} That's why you shouldn't use tools.

How offset works is quite easy, it offsets on your screen, that's why it won't be the same in preview as studio screen is smaller than your normal screen

If you still don't understand it, just ask.

0
I don't understand quite well :| Lualaxy 78 — 6y
0
So you have 4 numbers inside a size/position (in GUIs) {0,0}, {0,0 } the first two are for X the last two are for Y the first 2 of both X and Y are scale, the other ones for offset. Example, {0.25,0},{0.25,0} Would put the GUI 1/4th down and 1/4th right, it doesn't matter how big your screen is, however, {0,100},{0,100} Would put it 100pixels right and 100 pixels down, so that would change if User#20388 0 — 6y
0
your screen is bigger/smaller. User#20388 0 — 6y
0
oh okay thanks Lualaxy 78 — 6y
0
np User#20388 0 — 6y
Ad

Answer this question