Gui Resizing Problem

Soo I am trying to get the gui to be on the full screen and centered like its in studio but it doesn’t work:




2 Likes

Set the Size to {1, 0}, {1, 0} in the Gui properties tab. That will be full screen.

If you’re using a script then it should be guithing.Size = UDim2.new(1,0,1,0).

Hope that helps

3 Likes

cc: @tralalah

It worked but it kinda got off center with the text an button:

You need to set the position relative to the screen. I’ll explain the important part of Gui setup - you want to use scale instead of pixel dimensions, for both position and size.

The size parameter you filled in {1, 0}, {1,0} is the general size, {Xscale, Xpixels}, {Yscale, Ypixels}. It is additive, so both scale and pixel dimensions work together.

Scale is powerful because the screen dimensions don’t matter - if you want something for the whole screen, 1 represents the full size of the width/height of the screen. You generally use pixel dimensions to offset positions/sizes for borders, spacing off the edge of screen, etc…

When you make another Gui object inside a different Gui object (like a frame inside a button), the frame takes the dimensions of the button, or whatever it is sitting inside. A scale of 1 would represent the full dimensions of the parent Gui, not the entire screen. So that is something to look out for.

If your text and play button are separate from the background, then you set the position to
{0.5, 0}, {0.5, 0}, and the anchor point to 0.5, 0.5

The anchor point is where you’re point of reference is. The standard point of reference (0, 0) is the top left corner of whatever Gui you’re dealing with. 0.5, 0.5 sets the reference point to the center of the Gui object, which I’m guessing is what you want for your entry text and play button.

Hope that provides some clarification, Gui objects are a bit tricky to get used to :wink:

2 Likes

I understand but they are in one frame:

image

1 Like

If the frame is the dimensions of the whole screen (it’s full screen so yes), then the anchor point and position I mentioned should work.

2 Likes