Is It Possible to Detect Scrolling Distance and to Scroll a Frame Using a Script?

Basically, I am wondering if there is a way to know how far a player has scrolled within a scrolling frame. Is there also a way to scroll the scrolling frame using a scripts?

This shows how websites such as the Dev Hub can see if the client has scrolled to the given location:

So, is there any way to do this? Either through scripting or any other methods. Or does the engine not support that yet?

This would be very useful for UIs.
Thank you.

2 Likes

You can read and write (i.e. use TweenService to smoothly scroll to a position) the CanvasPosition property of a ScrollingFrame

2 Likes

I wrote a module that will handle the smoothing for you.

To check what the frame is up to, you check CanvasPosition and act accordingly.

1 Like