How to make textlabel go down each time?

I’m making a debug menu for a game and I would like it to make it so everytime theres a new message, its below the last message, like in the Developer Console GUI, I have found the dev console gui on roblox, but i’m not sure how to get an effect like that

You can use a scrolling frame with an UIListLayout

3 Likes

UiListLayout? Go watch a tutorial and you might find something useful.

There is an UIListLayout in the GUI, but im not sure how to make it work

You can set the VerticalAlignment to Bottom, and add more labels to the ScrollingFrame. The label positions will automatically be set.

After that, on a new message would I just add a textlabel to the scrolling frame and it would set its position automatically?

1 Like

Tried it out in a script, but text isnt appearing: Here’s my script

game:GetService("LogService").MessageOut:Connect(function(Message, Type)
	local msg = Instance.new("TextLabel", script.Parent.Parent.ClientLog)
	msg.Font = Enum.Font.Jura
	msg.TextXAlignment = Enum.TextXAlignment.Left
	msg.BackgroundTransparency = 1
	msg.TextSize = 20
	msg.TextColor3 = Color3.fromRGB(255,255,255)
	if Type == Enum.MessageType.MessageOutput then
		msg.Text = ""..Message.."" --..tostring(Type)
	elseif Type == Enum.MessageType.MessageInfo then
		msg.TextColor3 = Color3.fromRGB(0,100,255)
		msg.Text = ""..Message..""
	elseif Type == Enum.MessageType.MessageWarning then
		msg.TextColor3 = Color3.fromRGB(255,200,255)
		msg.Text = ""..Message..""
	elseif Type == Enum.MessageType.MessageError then
		msg.TextColor3 = Color3.fromRGB(255,0,0)
		msg.Text = ""..Message..""
		end
end)

That’s a pretty silly mistake, you forgot to give the text label a size :sweat_smile:

1 Like

Thank you! One more thing, how can I make it able to be scrolled down from?

You can change the canvas position

How would I be able to do this? like make it scroll on mouse scroll.

or make it scroll on clicking a slider and moving your mouse down, I have not worked much with GUI’s