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?
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?
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
this is NOT a request site
ur mom is not a request site... Yo chris, somewhere in properties is canvas position, use a loop to change that..
haha alberto cannot say anything because you have more rep
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.