Changing Scroll Length in ScrollingFrames?

Hey there! I’m scripting a custom scroll system and I’ve run into a problem with the UI.

On PC, I move my mouse inside the scrollingFrame and rotate the mousewheel, but for some reason, every scroll gets me halfway through the inventory, which I want to decrease to allow the player to have a more accurate scroll.

I’ve enabled AutoCanvasSize so that the ScrollingFrames adjusts to the items inside it.
This also means that I don’t need the CanvasSize property, because at Y = 0, it’s perfectly sized for my items.

I’ve read on the devforums that to decrease how far down a scrollingframes goes per scroll, I have to increase the Y component of the scrollingframe’s CanvasSize. But there’s a problem.

If I set it to anything greater than 0, I get a blankspace below my items, so changing the CanvasSize is not an option.

I have also tried to handle scrolling by checking for mouse wheel myself and changing the canvasposition, but scrollingframes have a special function which disables any mouse events firing, so I cannot detect when the player is scrolling with their mouse wheel because none of userInputService, mouse events and GuiObject.mouse events fire for mouse wheel rotation when your mouse is inside a scrollingframe.

Is there any way I can change how far a scrollingframe scrolls every mouse wheel rotation?

1 Like

Do you have a UI padding that uses scale under the scrolling frame?

No, but I do have a UIAspectRatio set to 1 on each of my items to keep them as squares. The only UI component parented to my scrollingframe is the UIGridLayout.