Help with my script / gui schroll (Gui /script/ table)

I need to patch a bug on my GUI when the scroll is too long for all the text
Issue :
I’m not trying anything because I don’t really know how to do it
This is the script i created for that

local BindableEvent = game.ReplicatedStorage:WaitForChild("MedStudio"):WaitForChild("MedStudioAddLog")





BindableEvent.Event:Connect(function(UserName, theCommand)
	local StartCords = script.StartCords.Value -- 003
	local StartCanvas = script.StartCanvas.Value -- 10
	local TextSetNumber = script.TextSetNumber.Value -- is 10 is 18
	local item = script.TextLabel:Clone()
	 item.Name = TextSetNumber
	
     item.Text = UserName.." | "..theCommand
	 item.Position = UDim2.new(0,003,0,tonumber(StartCords))

	 item.Parent = script.Parent.Frame.ScrollingFrame
	 script.Parent.Frame.ScrollingFrame.CanvasSize = UDim2.new(0,0,StartCanvas,0)
	 script.StartCords.Value = tonumber(script.StartCords.Value + 28)

	 script.TextSetNumber.Value = script.TextSetNumber.Value + 1
	 if TextSetNumber > 18 then
		 script.StartCanvas.Value = script.StartCanvas.Value + 0.5
	 end
end)
--game.ReplicatedStorage.MedStudioAddLog:Fire("Med367367","test")

The GUI
MyLogsGUI.rbxm (10,0 Ko)
*I have the same problem for my Admin Cmd Gui

Hey, the problem still unpatched, i send this message to try to bring up the subject. If you have an idea of ​​the problem do not hesitate

Hi there! I’m here to revive your post from the dead!

What I think the bug is…

script.Parent.Frame.ScrollingFrame.CanvasSize = UDim2.new(0,0,StartCanvas,0)

Right here, you’re setting the Y scale to StartCanvas, not the Y offset. This means you’re adding StartCanvas percent of the scroll window’s size to the scrollable area rather than adding just a few pixels extra.

Try this:

script.Parent.Frame.ScrollingFrame.CanvasSize = UDim2.new(1,0,0,StartCanvas)

Refactor Suggestion: Using a Layout Element makes this really easy!

Roblox’s Layout instance family automatically configures all children of a UI element into a certain layout. There is one for a list, like the one you’re creating. The useful thing about layout elements is they have a property called “AbsoluteSize” that tells you exactly how big the parent element needs to be to hold all the elements. Check them out here.

1 Like

when i use this, the scroll gui no longer growing

I don’t undesrtand how use AbsoluteSize