Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to scale text in TextButton according to screen size?

I'm trying to make a GUI, and when I insert a TextButton into the GUI, the text inside it is only scaled to my computers screen size. That may be confusing so basically, when I test the GUI in another device, the text is cut off on the GUI. How do I fix that?

2 answers

When you enter the size of a textlabel or other screengui object you use UDim2. The first and third number slot makes it fit to screen. {0, 0},{0, 0} The second and fourth do other size. For example if you make it {1, 0},{1, 0} it will cover the players whole screen. The other number slots do small specific adjustments while the first and third do it compared to player screen size. A players screen size is {1, 0},{1, 0} To do a quarter of the screen do {0.25, 0},{0.25, 0} for example.

1 comment

0

She is talking about the text INSIDE the text button, not the text button itself.

You can turn on TextScaled to make the text scaled with the button like so assuming the text box is the parent of this script.

script.Parnet.TextScaled = true

Hope this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.