Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to scale text in TextButton according to screen size?

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago

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.

0
She is talking about the text INSIDE the text button, not the text button itself. hiimgoodpack 2009 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

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!

Answer this question