This is an issue that happens to TextLabels that are descendants of only BillboardGuis in particular, with TextScaled set to true.
If you first set the TextLabel’s size to 0,0,0,0, then set its XY Scale to anything equal to or between 0.4 and 1, the TextBounds value will become nan, nan. Attempting to change the size scale to any value afterwards will never update it from nan, nan.
But, the TextBounds will correctly update under any of the following changes:
The size offset is changed
RichText is changed
Keep in mind that this bug occurs regardless of RichText being true or false, but it will update upon its change.
This issue was first seen in tank game a few weeks ago. We tweened Billboard.Size to UDim2.fromScale(0, 0) for animation purposes. After tweening the billboard size back, we observed TextLabels having TextBounds as (nan, nan). We applied a bandaid fix for that by toggling RichText on every TextLabel.
Yesterday (which matches the time of this report), it started happing for TextLabels with RichText = true.
Since we tend to animate by size quite a lot, almost every billboard is missing text in studio. (Roblox client still seems to be fine)
Hi @supportTheBlueFan , thanks for reporting this issue. We are in progress of fixing this issue. Technically RichText should not have this issue, could you give us more details about which platforms (studio only or the client) you are seeing this issue with RichText=enabled. Another workaround could be to tween from a small size rather than (0,0). Let me know if this works for you! Sorry about the inconvenience.
This fix worked. Previously I tried tweening from UDim2.fromScale(0.1, 0.1), which did not work on smaller screen resolutions. UDim2.fromOffset(1, 1) fully fixed the issue.