Is there any automatic way to leave a Button.Size.Scale.X = 1 inside the ScrollingFrame discounting the vertical scrollbar?

I have this ScrollingFrame and inside it, there are some buttons:

image

Currently, each button have a size {0.913, 0},{0.061, 0}
The Button.Size.Scale.X is 0.913 because I had to adjust it manually to fit the entire horizontal space.

Is there any automatic way to leave the Button.Size.Scale.X = 1 inside the ScrollingFrame discounting the vertical scrollbar horizontal size?

1 Like

Most people use Scale 1 subtracting the Offset by the Width of the scroll bar + the amount of padding you want.

UDim2.new(1, 0, -BarSize - PaddingSize, 0)

Then only by script?


No, also I made the thing wrong lol :slightly_frowning_face:

so the thingy is here

{1, -22},{0, 64}

1 Like

Got it, set Button.Size.X.Scale = 1 and Button.Size.X.Offset = the ScrollingFrame ScrollBarThickness value as negative.

1 Like