[Solved] Scrolling frames Keep scrolling back up!

  1. What do you want to achieve? To fix the scrolling frame constantly bouncing back up.

  2. What is the issue? The custom scrolling frames don’t work, the frames don’t scroll down but up.

  3. What solutions have you tried so far? N/A

  4. Why did you create a custom smooth slider frame?
    I’ve created a custom scrolling frame because It would look nicer like it does in an internet browser and like not stop in a corner.

The frame keeps scrolling back up. If you try to scroll back down. It scrolls back up. I wanna keep the smooth slider design, does anyone see what’s wrong with it?

My Code:

Any help would be appreciated :heart:

local down = false
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local scrollspeed = 5
local friction = .9

local frames = {}

for _, v in ipairs(script.Parent:GetChildren()) do
	if v:IsA("ScrollingFrame") then
		table.insert(frames, v)

		yvel = yvel + scrollspeed
	down = false
	down = true
		yvel = yvel - scrollspeed

while true do
	yvel = yvel * friction
	for _,scroller in ipairs(frames) do
			scroller.CanvasPosition = scroller.CanvasPosition + Vector2.new(0,yvel)

if down then
			yvel = yvel + 5
		elseif not down then
			yvel = yvel - 5

Can you tell us why using a script to scroll down a bar was necessary when the scrolling frame already handles this for you?
Or are you trying to do something else?
Please be a bit more concise.
Edit : thanks for editing the post

Replying to the OP, I think there is already a module to do the smooth scrolling effect you want:

EDIT: Like what @ZvClaw said :smile:

1 Like

There’s also a section in this tutorial covering smooth scrolling and some dandy features.

1 Like

Possible solution:

Just found out that the scrolling frame won’t scroll if the mouse is hovering over the frame. I think it works now just need a little more time figuring this out.