Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to auto-scroll a scrolling frame?

Asked by 5 years ago

I wanna change the value of scroll in a scrolling frame (or automatically scroll it to a certain point)

How could i pull this off?

0
this is NOT a request site 3wdo 198 — 5y
1
ur mom is not a request site... Yo chris, somewhere in properties is canvas position, use a loop to change that.. greatneil80 2647 — 5y
0
haha alberto cannot say anything because you have more rep Ampulidta 12 — 5y
0
There is a difference between a request and someone asking how to do something. This is obviously the latter, the only difference is that it is up to the person providing the answer whether they want to give you a scripting solution or an explanation. SteamG00B 1633 — 5y

1 answer

Log in to vote
0
Answered by
SteamG00B 1633 Moderation Voter
5 years ago
Edited 5 years ago

I decided to give you a script solution because I was interested in this myself, and it actually took a bit to figure out. The scrolling frame property that determines how much the scroll bar can go is the second Y value of CanvasSize if you want to set it in the properties window, otherwise, it would be the CanvasSize Offset. This just loops through it and when it gets to the end, it goes back up to the beginning.

local max = script.Parent.CanvasSize.Y.Offset
for i=1,max do
    script.Parent.CanvasPosition = Vector2.new(0,i)
    if i==max then
        i=1
    end
    wait()
end

Now, if you want to make it seem like it is moving seamlessly, put what the frame looks like on the very bottom on the top, so when it jumps and continues scrolling, it'll just look like it was scrolling continuously.

Also, if you want the scroll bar to be invisible, then set the scroll bar thickness to 0.

Ad

Answer this question