Command promptish typer

  1. I would like to make a typer working like the Windows 10 command prompt, it should show the most recent message on top and the least recent on the bottom, it should also delete messages going of screen

  2. The Order doesn’t work because of the automatic sorting of children from roblox! i also have no idea how you would delete the latest message

This is what I’ve got so far!

local commands = 0
script.Parent.FocusLost:connect(
	function(enterPressed)
		if enterPressed then
			local pos = 0
			for i, v in pairs(script.Parent.Parent.OutPut:GetChildren()) do
				v:TweenPosition(UDim2.new(0, 0,0, pos + 35), 'Out', 'Bounce', '.1')
				pos = pos + 35
			end
			commands = commands + 1
			print(script.Parent.Text)
			local temp = script.Template:Clone()
			temp.Name = "Command_1"
			temp.Input.Text = script.Parent.Text
			script.Parent.Text = ""
			temp.Parent = script.Parent.Parent.OutPut
		end
	end
)

all replies welcome!

UIListLayout won’t work because it doesn’t keep the most recent on top

Sure it can. Just set the LayoutOrders of each label accordingly. Set the oldest as 1, and add 1 each time.

1 Like

Sadly doesnt work!


it should go like
9
8
7
6
etc

this is my current script:

Check the SortOrder property of the UIListLayout. If it is set to Name, change it to LayoutOrder.

Oh i was not using a UI List LayOut Since it wont keep newest message on top

That’s what I was saying. To use a UIListLayout. If you do it right, it will position how you want it to.

1 Like

yes, i understand! but then this happend


again should go
0
9
8
7
6
5
etc.

ive managed to fix it! sorry your instructions were a little bit unclear! i needed to subtract the order not add

It wasn’t unclear, but you do you. Anyways glad you figured it out in your own way! Have a good day.

1 Like

you too! :slight_smile: thank you for the answer! I will mark you as a solution