How can I create padding between a text and button?

Hello everyone! Happy New Years Eve! I would like to figure out how I can scale this text size to not fill out the entire button but around 75% of it. I’m not looking in to using “TextScaled” as it makes the text fill out the entire button. I’ve tried using UITextSizeConstraint but that still fills out the entire button on lower resolutions!!!

This is what I want it to look like on all screens!

This is what it looks like when I use a smaller resolution and UITextSizeConstraint!

1 Like

use UIScale. To set the scale, implement a script that gets the absolute vertical resolution of the screen (workspace.CurrentCamera.ViewportSize.Y) ,then divide it by some constant e.g 720 to get the Scale.
Using this method, you can make your UI completely with offset and then it will scale appropriately for all resolutions with the script.

1 Like

set the size of the text to 1,0,1,0 and scale to the size you want and it should be scaled rightly to all devices

1 Like

Insert UIPadding into the label. It acts like HTML/CSS padding.
Set the top and bottom to {0.125, 0} and the text will occupy 75% of the label.

3 Likes

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