Is there a way to use TextService:GetTextSize with Scaled text?

Hey all, so I’m trying to make a UI that scales to the size of the Player’s username, but I am using scaled text, so I’m wondering how to make TextService:GetTextSize() work with scaled text. To my knowledge TextLabel.TextSize doesn’t matter if you are using TextScaled.

Is it even possible?

You could do string.len() to get the amount of characters, and base it off of that. If I’m not mistaken there’s no property the specifies how small the characters are. (In the case of it being resized in the ui to make it fit.)

I don’t think so because TextScaled auto-resizes the text so there isn’t a consistent FontSize (TextSize)

Can you elaborate on this? This could work, however I’m not sure how I can make it work because the textbounds property is being really buggy for me.

GuiObject | Roblox Creator Documentation this will let you do this without coding

1 Like

Oh damn, really? This is a real time saver! Thanks! However, how do I enable this using Enums Figured it out

1 Like

you can find automatic size in the property

Now I have a different issue. Its in a billboard Gui, and now the auto size is screwing with the text. The text won’t stand still or stay one size.

is it possible for you to provide some screenshots, or videos?

Yep. Here’s a link for the issue

Hmmm…, that might be a bug, the feature is new, so it might have some broken parts, in this case, you might want to do this in a script

local billboardGui = script.Parent
local textlabel = billboardGui.Textlabel
local player = game.Players:GetPlayerFromCharacter(billboardGui.Parent)
local LetterSize = 5

textlabel.Text = player.Name
billboardGui.Size = Udim2.new(0, lettersize * tonumber(string.len(player.Name)), 0, 10)