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)
[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