How to scale scrolling frame bar on different screen resolutions?

This is what I made and how it looks in my studio:
image
And this is what I got on 1920x1080 screen:


Someone know how to scale it?

2 Likes

The scroll bar thickness is in offset, meaning pixels. There are two things to make your background of the scroll bar be consistent with the actual scroll bar.

  1. You can set the background scrolling frame to the same width in offset as the scrolling bar’s thickness. For example, {0, scrollbar thickness, height, 0}. However, I assume that that’s not what you’re looking for.

  2. You can use screen size to scale the scrolling bar accordingly with a local script.

local mouse = game.Players.LocalPlayer:GetMouse()
local x = mouse.ViewSizeX

ScrollingFrame.ScrollbarThickness = x / 25 --some number to divide the screen size by

I recommend not making the scroll bar proportional to the width because on mobile devices, it will be very small which can make it hard to drag it (especially when we’re talking about the younger audience which has not yet developed full dexterity). But regardless there’s the solution.

Hope that helps!

10 Likes