Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Prevent ScrollingFrame from Scrolling?

So I am trying to make a scrolling frame that dosen't have the ability to scroll.

Hear me out I know it sounds stupid but

I want to make something like adopt me where

The players just press on arrows to scroll on each side of the scrollling frame

so if the player presses the left arrow it changes the

ScrollingFrame.CanvasPosition

To the negative

Now the problem I am facing is that I only want players to use the arrows

but they have the ability to scroll

I have tried setting the CanvasSize to 0 but when I do that my script messes up

and it wont set the CanvasPosition any further than the amount of objects there are.

ScrollingFrame.CanvasPosition = Vector2.new(ScrollingFrame.CanvasPosition.X + ScrollingFrame.AbsoluteSize.X,  ScrollingFrame.CanvasPosition.Y)

this is what I am trying to do but the scrolling ability of the frame makes this pointless

Also please no crazy answers where I need to play with userinputservice or contextactionservice along with input events

**** In Conclusion basically I want to be able to set the CanvasPosition of the ScrollingFrame without giving the players any ability to actually scroll so that

They will be able to use the arrows instead of the scrolling with the middle scroll or touch scroll

Only the ARROWS****

1 answer

✓ Accepted answer

Scrolling Frames have a built-in property called ScrollingEnabled which basically prevents the player from using the scroll wheel or the scroll bar.

Hopes this helps you.

This discussion is preserved as it was. New answers, comments, and votes are closed.