Why do Billboard Guis Change Sizes When You Move/Zoom Away From Them?

Introduction


Recently, I've notice numerous people confused or frustrated over BillboardGuis scaling when you move towards or away from them. Although there may already be resources on this topic, I have decided to make a tutorial on how to fix it.

Example

Breakdown


Although this may seem like a great task to correct, it's actually pretty simple. To fix this issue, you have to know how UDims work (the size value in a frame).

image
The highlighted value is an UDim (U-Dimension)

What is an UDim?


An UDim is comprised of two values: the scale, and the offset. Both values are listed in the order as it would be in the properties menu. You are likely using the offset when working with UI. To learn the values' nature, please read the definitions below:
Scale The scale value in an UDim is a direct scale based from the screen for the axis it represents. All you need to know is, in BillboardGuis the scale is measured by studs and if it or the window is scaled, the frame's size will follow with the window. Notice how the frame changes size with the window.

Example:

Offset Unlike scale, the offset is measured by pixels in both windows and BillboardGuis. With offset, you'll also see how the frame keeps own it's size; even if the window can't fit the frame. You'll need to keep this in-mind for the fix.

Example:

Fix


Now that you know how UDims work, you may have figured out the issue; offset keeps it's size. This still may confuse you, but the BillboardGui is actually not sizing up, the depth perception just isn't there. The frame isn't changing size, you're just moving away. You can see this if you keep your fingers around the frame and just simply back away.

To fix this issue, you just have the make the frame and BillboardGui’s size use the UDim scale value. Remember, the scale changes size with the window. In this case, it will get smaller if you move away for it.



End

I hope this tutorial helped you and you learned a few things. If I have missed any information, feel free to give me feedback in the comments.

Helpful links:
https://developer.roblox.com/en-us/api-reference/datatype/UDim
https://developer.roblox.com/en-us/api-reference/datatype/UDim2

10 Likes

Thank you for sharing this detailed guide. :fire:

Might be good to mention that for BillboardGuis, scale is the size in studs. It could save someone from needing to mess around with it, and it’s good to know. You might as well mention that offset is measured in pixels while you’re at it, but hopefully that is relatively well known.

1 Like

Thanks for the suggestion, I have implemented it to the UDim description.

1 Like