Scale-size

There are six scale-size options:

  • "RootX"

  • "RootY"

  • "RootXY" ​

  • "FrameX"

  • "FrameY"

  • "FrameXY"

Enabling scale-size will make Size a percentage of the root/frame size instead of a fixed pixel amount. Additionally, it will make all other offsets and sizes relative to the Size.

It will use the specified axis — for XY it will get the in-between of the two axis sizes.

circle-info

When using a - ScreenGui: Root is the user’s screen. - SurfaceGui: Root is the SurfaceGui.

Frame will always be the text the frame is contained within.

Visualizing & calculating size (for root only)

You can easily find the Size that maintains the aspect ratio you are seeing in the studio viewport using the code snippets I’ve made for you.

Run the code for your GUI root in the command bar:

ScreenGui

local scaleSize = "X" local textLabelSize = 14										local viewportSize = workspace.CurrentCamera.ViewportSize if scaleSize == "XY" then viewportSize = (viewportSize.X + viewportSize.Y)/2 else viewportSize = viewportSize[scaleSize] end warn(math.round(textLabelSize/viewportSize*100*1000)/1000)

SurfaceGui

Make sure to select your SurfaceGui before running.

Make sure to input your desired ScaleSize type/axis and the TextLabel’s size.

It should print out a number in the Output window. This is what you want to input for the Size to maintain the aspect ratio you are seeing in studio.

Last updated