What do you want to achieve? To fix the scrolling frame constantly bouncing back up.
What is the issue? The custom scrolling frames don’t work, the frames don’t scroll down but up.
What solutions have you tried so far? N/A
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? gyazo.com/509b4da24638729de701f1066065d548
My Code:
Any help would be appreciated
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)
end
end
mouse.WheelBackward:Connect(function()
yvel = yvel + scrollspeed
down = false
end)
mouse.WheelForward:Connect(function()
down = true
yvel = yvel - scrollspeed
end)
while true do
yvel = yvel * friction
for _,scroller in ipairs(frames) do
scroller.CanvasPosition = scroller.CanvasPosition + Vector2.new(0,yvel)
end
if down then
yvel = yvel + 5
elseif not down then
yvel = yvel - 5
wait()
end
end```
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
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.