Text on one line

Hello,

How do I write a text on a TextLabel and make sure it uses 1 line while TextScaled is true.
The text changes depending on the weapon name.

image

Thanks

3 Likes

There really isn’t a good solution to this problem. I’d usually suggest disabling TextScaled and resizing the text font size to an amount that looks perfect given that you know the size of the object. However, for this specific case, you should extend the X axis size. (diminishing the Y axis size should also help as long as you increment the X axis)

3 Likes

Have you tried using UITextSizeConstaraint?

2 Likes

I do not know what that is and I do not see it in the properties.

1 Like

It’s not a property, it’s an object. It works if you parent it to the GUI object that you want control over. I’d recommend reading the wiki for more detailed information: UITextSizeConstraint | Documentation - Roblox Creator Hub

2 Likes

Sorry for coming in even though this thread is old. Well, I think the issue was caused by RichText property. (if anyone needs help with this)

TextLabel with RichText:

TextLabel without RichText:

This wasted an hour of my time to figure out so thats dumb I guess.

3 Likes

If anyone wants to keep on Rich Text while still doing this, I recommend checking out my tutorial I just made.
https://devforum.roblox.com/t/text-labels-on-one-line-while-keeping-rich-text-on/3035233

1 Like