Scrolling isnt detected by anything

I’m trying to connect sound to scrolling event of scrolling frame. The problem is that none event isnt fired when it should. I’ve also tried connecting to the UserInputService InputBegan, but this seems to not detect scrolling too.

Debug script in scrolling frame
UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(inp)

if inp.UserInputType == Enum.UserInputType.MouseWheel then

print("scroll")

end

end)

script.Parent.MouseWheelForward:Connect(function()

print("scrolldown")

end)

script.Parent.MouseWheelBackward:Connect(function()

print("scrollup")

end)

Is this a local script and where is this located? Try to scroll outside and inside the frame.

Yes, its local script in scrolling frame. Same result in and out of frame.

This should work:

[ScrollingFrame]:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
   --This will be triggered any time the canvas is scrolled
   --If you want to do anything with the CanvasPosition value, you will need to grab it
   local curCanvasPosition = [ScrollingFrame].CanvasPosition
end
1 Like

Yep, its work. It’s more like work around but its doing job. Thanks

1 Like