I’m currently working with scrolling frames, and I made a auto canvas resize so I don’t have to bother resizing other buttons, it works with offset, it doesn’t change the size of it’s children, but if I do scale it stretches it.
(P.S. UIGrid Layout ^)
BUT, my issue is that if the UI Grid Layout is set with offset, it doesn’t maintain it’s size when changing windows
Example
Offset:
Scale:
“So why don’t you keep it on scale”
Because my auto canvas resize script is messing with the content size and it stretches it depending on more content
You wanna use in the position and size properties only Scale values, which basically autoscale on every device.
--heres an example with a Frame
--LocalScript
local Frame = Instance.new("Frame")
Frame.Parent = script.Parent --PlayerGui
Frame.Size = UDim2.new(1,0,1,0) --This will make the Frame as big as your screensize. It's scaled on all devices to 1 (1 = 100%) and would cover your screen.
Frame.Position 0 UDim2.new(0,0,0,0) --This would place the Frame to 0 and 0 on all screens.
--UDim2.new(ScaleX,OffsetX,ScaleY,OffsetY)
--You wanna see Scale as screen size resized for everyone
--You wanna see Offset like the size which is replicated on your screen, replicated the same as on others screens. So if you'd make a Frame which is maybe big as your screen, but positioned and sized on offset, it would fit on your screen but not on the other peoples screen with a different screen size.
no, you do not get what I mean, the children inside stay the same size, so if I play on mobile they will be too large inside the scrolling frame, you can prevent that by doing scale instead of offset on the uigridlayout sizing, I NEED offset because my auto sizing canvas doesn’t mess with it’s childrens size, SCALE does
I would set I to the same thing thst you have eith the others as a ui I had this issue before but when I scaled them all the same and put them in there the problem fixed.
yea, I use UI Grid Layout for the scrolling frame, I made a script that auto does the canvas size depending on it’s children count, whenever I use 1, 0, 1, 0 (scale) it would work but it stretches the buttons as the canvas updates, it also has a positive side is that it scales on all windows
BUT 0, 1, 0, 1 (offset) WORKS just how I wanted it, only downside is that it doesn’t scale to it’s windows
Wait wait wait you’re telling me you’re using script to automatic canvas size depending on its children counts? (Because I think it’s because of your script)
And also have you check ever out a property ScrollingFrame called automaticCanvasSize?
I don’t know if I’m stupid or anything, I thought I saw a topic where they removed it, again one of the simplest problems turning into a 2 hour work, regular me but appreciate you @Humaidi_0
CanvasSize set to UDim2.new(0, 0, 0, 0) and AutomaticCanvasSize to ‘X’, ‘Y’, or ‘XY’ (depending on the context) should work fine, UILayouts which constrain the size and/or padding of elements should be assigned values according to offset as opposed to scale.