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

I'm having a hard time getting scrollingframes to work the way i want them to, could anyone help?

So i'm trying to make a gui with a ScrollingFrame using scale problem is that i don't know how i can change the size of the canvas accordingly and how i change the size of the guiobjects in the gui accordingly please help

1 answer

well, if you want roblox to size/position GUI objects in your game accordingly, then make sure all Position and Size properties of your GUI objects are in Scale and not Offset. so instead of Udim2.new(0,100,0,100), you would do Udim2.new(1,0,1,0)..

which means when you look at the position/size of your GUI objects in the explorer window it should look like this if scaled: {number, 0}, {number, 0}

any GUI object that uses Scale will always be positioned/size relative to size/position of parent GUI or screen.. scale is a percent of parent GUI or screen, scale of 1 is 100%, .5 is 50% etc

2 comments

0

I already understand how scale and offset work my problem is that i need to script it so the canvas size will change to the right size and the guiobjects inside will change to the right size to fit the canvas

0

then make sure Frame.CanvasSize is in scale: https://developer.roblox.com/en-us/api-reference/class/ScrollingFrame

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