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

Why does this happen with the scale of CanvasSize?

Asked by
Vlym 19
6 years ago
Edited 6 years ago

So I am a beginner with Gui's. I copied this script into a local script to create a scrolling frame. From what I know, when either one of the dimensions of the CanvasSize is larger than the Frame size, the scroll bars are created. By my logic, if the frame size in the Y direction is 200 pixels (as shown in the script) and the CanvasSize is scaled by 2, does that mean the CanvasSize will be twice as big as the frame; 400 pixels in total? Therefore, if the CanvasSize scale is 1 or lower, shouldn't there be no scroll bar? This is how I am thinking, but in the Gui, only at 0.1 scale is the Y scroll bar absent. Someone please help, I don't get it


local scrollingFrame = Instance.new("ScrollingFrame") scrollingFrame.Position = UDim2.new(0.2, 0, 0.1, 0) scrollingFrame.Size = UDim2.new(0, 200, 0, 100) scrollingFrame.CanvasSize = UDim2.new(0, 600, 2, 0) scrollingFrame.BackgroundColor3 = BrickColor.White().Color scrollingFrame.BottomImage = "rbxassetid://156476249" scrollingFrame.MidImage = "rbxassetid://156476256" scrollingFrame.TopImage = "rbxassetid://156476261" scrollingFrame.Parent = screenGui
0
Can you put this in code block? TheLightningRises 56 — 6y
0
done Vlym 19 — 6y

Answer this question