Cool ScrollingFrame trick (Replicate Roblox's Widget Scrollbar)

In this tutorial i will teach you how to replicate this scrollbar

image

I was trying to make UI for my plugin and tried to make it as close to roblox UI as possible and then i found work around to replicate it!

Cool ScrollingFrame.rbxm (10.5 KB)

How does it work? :thinking:

Scrollbar has 3 Components:

  1. Top;
  2. Middle;
  3. Bottom;
  • We get are rid of all of them but Middle (i used custom texture tho)
  • And now we are setting background of our Scrollbar by setting BackgroundColor3 of ScrollingFrame to it.
  • Inside ScrollingFrame we create a frame and name it “Background” then make sure its Border3 color is the exact same as its BackgroundColor3 and anchorpoint musst BE 0,0 ALWAYS, give it a little BorderSizePixel to avoid scaling glitches.
  • Inside background we put UIListLayout for example becouse we should treat this Frame as ScrollingFrame for this trick to work.
  • Create Lower and Upper buttons OUTSIDE scrolling frame (They have very specific position and AnchorPoints!)
  • Everything else is handeled by script pretty much.

You can improve it of course by adding Horizontal sliders etc but i didn’t fell like it.

3 Likes

check the code bro, its the scrolling mechanism caused by clicking the buttons
its not that deep

1 Like