How do I make a UIGradient on a BillboardGUI TextLabel only apply from the start and end of the text?

Hey, I’m trying to make a BillboardGui for my game to show above the player’s head, but I want the gradient to only start and end with the text.

As you can see here is the main issue (background visible to show start and end):
image

Now, I have tried using TextBounds, but this is client sided only. I have tried passing it through a RemoteFunction but this is way too unstable and only works if the player can see the Gui. (first person for example breaks this)

Additionally, TextService won’t be useful either as this label is using TextScaled, and TextSize won’t be good for a BillboardGui as it is constantly changing in pixel size.

I’m genuinely stumped here. If anyone has any tips or solutions, please let me know!

I can change the size of the TextLabel manually, however I have many different titles of different lengths and fonts, so this isn’t really an option, unless I was to do it per title, but that would be really inconvenient, and I am looking to make a dynamic method.

Also, changing the transparency of the UIGradient doesn’t work either. And offset would require the same manual toggling.

Update: I got it working with AutomaticSize

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.