How to fix scrolling frame textbutton scaling

Hi, so I cannot for the life of me figure out how to fix the problem for my ui. it is constrained, and I am using scale. it works great! until I’m in the game that is.
in studio:


in game:

I have a script that changes the scrolling frame’s canvas size, which leads to that problem with the scaling, but not changing the canvas size is a bother too. now, this is when i use offset. this is how it looks to a phone.
for pc:

for phone:

how do I fix this? it’s super annoying and I am lost on what methods to try to fix it. Thanks for reading!

2 Likes

The wordings kinda confusing but i think (correct me if im wrong) your problem is that the text is smaller in game then studio. You can fix this setting the TextScaled property to true in your textlabel or button

1 Like

No the problem is not the text, the problem is that my buttons become super small when i scale the canvas size of my scrolling frame.

2 Likes

I presume this is the problem element in question - I’m gonna give you a solution based on my assumptions:

I’m guessing that you want the left panel to be a vertical list of buttons, and you’re having the problem where you have each button sized using scale - therefore when your CanvasSize changes, the button grows or shrinks unintentionally.

Presuming that you are using UISizeConstraint to combat this, when you go from studio to live-gameplay (so your viewport size is much bigger), the text is now seeming too small because it hits the size limit sooner.

SO, in order to properly size your vertically listed buttons, what you need to do is:

  1. Remove UISizeConstraint
  2. In the listed button UI item, set the SizeConstraint property to RelativeXX
  3. The size of this UI item is now relative to the X size of its parent (the ScrollingFrame canvas), so set the Size of the item to {1, 0, 0.5, 0} (change the Y=0.5 to whatever you want, this example makes the UI item half the height of its width)
1 Like

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