How to make custom chat increase it's Y size and automatically go down to the bottom

Hello, I am wondering how I would make my custom chat automatically scroll down to the bottom whenever you type a message and increase its size endlessly, like the default Roblox chat. I have already coded the message system. Basically, there’s a UIListLayout and a new frame gets created every time with the text inside of it. I will provide some photos below.

roblox custom chat 2

roblox custom chat 1

Whenever you or somebody else types enough messages it fills it up then it doesn’t scroll down and you have to manually.

3 Likes

I haven’t tried UIGridLayout yet. Maybe that would work better?

1 Like

I found the solution! For anyone in the future reading this you have to make the UIListLayout’s Canvas size it’s AbsoluteContentSize.Y example :

MainGui.MainChatWindowFrame.ChatWindow.CanvasSize = UDim2.new(0, 0, 0, MainGui.MainChatWindowFrame.ChatWindow.UIListLayout.AbsoluteContentSize.Y)

Then you make it so it scrolls to the bottom of the scrolling frame

MainGui.MainChatWindowFrame.ChatWindow.CanvasPosition = Vector2.new(0, MainGui.MainChatWindowFrame.ChatWindow.UIListLayout.AbsoluteContentSize.Y)

And that should solve it.

1 Like