Any way to compute what size of a ScrollingFrame's slider is?

I’ve noticed ScrollingFrames’ sliders use offset when they scale. This looks horrible on mobile devices, and I have no way of changing it. Roblox is also hiding information from me, so I have no way of knowing what size that slider is set to if I wanted to remake my own version of it.

I’m trying to come up with the algorithm they used for the scaling of it, so I can make a fake version that’s accurate to the real one, but that uses scaled sizing on its X axis so it looks nicer on different resolutions.

It almost seems like Roblox is throwing a random offset to the computed size the slider should be, and if that’s the case, there’s really no way for me to do this lol. I also don’t really know how I can come up with a scalar that ranges from 0-1 depending on if the slider is at the bottom of the canvas or not.

Any help is appreciated, thanks.

just another thing I wish I didn’t have to do, but it’s Roblox, so I expect nothing less.

1 Like

The default ScrollBarThickness is 12… can’t you maybe play with this size as the gui changes its scale somehow?

Edit: maybe multiply this current size by the scalar size to have it follow the scaled size of the frame.

Re-Edit: sorry did you mean the slider inside the scrollbar? This changes size with the scrollbar thickness.

1 Like

Appreciate it, but that’s not what I need.

I’m trying to calculate the size in absolute pixels of the slider itself, not its thickness.

1 Like

If anyone’s curious I believe the formula is just the scroller window size divided by the canvas size, and that gives you a scalar. Multiply that by the absolute size of the window and that should give you a pretty close size to the real slider.