I am trying to make a script that makes orders get put in order from the number for example order number 1 will be at the top and order number ten will be at the bottom because it is the last order that has been made and when the order has been collected it gets removed from the screen. I have made the script for the text showing up on the board but whenever I make the different orders be in order it does not work I also need to make it that the new text GUI has been placed in the correct place.

Script:

local screenGuiText = -- reference to the input text box
local surfaceGuiText = -- reference to the surface gui text label
local button = -- reference to the enter button for the input

button.MouseButton1Click:Connect(function()
    surfaceGuiText.Text = screenGuiText.Text
end)

-- or, for dynamic changing --
screenGuiText.Changed:Connect(function()
    surfaceGuiText.Text = screenGuiText.Text
end)

This is as far as I have gotten and I cannot really find a way to make the rest of the script.

3 comments

0

You could just use a UIListLayout ( https://developer.roblox.com/en-us/api-reference/class/UIListLayout ) to automatically order your instances (they'll order in terms of which was added first)

0

Yes but how do I make it that it makes new text GUI's and puts them in ordw

0

It automatically puts them in the order