How do I stop the Billboard Gui from resizing when the camera is zoomed out
How do I stop the Billboard Gui from resizing when the camera is zoomed out
When sizing, make sure to use the scale vector rather than the offset vector. Scaled size is relative to the part itself (relative to studs), whereas the offset size is relative to user screen (pixels). This means that the scaled size will be the same size proportionally to its surroundings, but the offset size will be the same pixel size regardless of how close you are to it.
Good luck! Hope this helps.
This should be in #help-and-feedback:scripting-support.
Is the behaviour you show in the video the current or desired effect? Building on what @Galactiq said, use Scale if you want the UI to shrink when you zoom out like the health bar in the video, and use Offset if you want it to stay at a consistent size.
https://developer.roblox.com/en-us/api-reference/datatype/UDim2
https://developer.roblox.com/en-us/api-reference/datatype/UDim
I want to keep the size, when I use offset to resize, it only moves the icon, how do I use it?
Matthew is right, Scale is how you make it stay the same size.
Using Scale makes the size relative, meaning that it grows and shrinks along with the rest of the world and appears to stay the same size. While an Offset GUI may seem to grow larger when the camera is zoomed out, it’s just retaining an absolute size on the player’s screen and ignoring perspective.
@GIEGO04 I’m assuming you’re wanting the image to scale in the same fashion as the health bar. If this is the case, you’ll need to use Scale exclusively to size both the BillboardGui object and the ImageLabel inside.