Hello there,
Just a helpful and handy tip, do not ever use the second parameter of the Instance.new constructor function. (It is a really bad practice, and IIRC, it performs slower than doing it manually.)
Instead, what you want to do is set the parent of the instance like this:
local Text = Instance.new("TextLabel")
Text.Parent = script.Parent
Overall, this is much better and should be practiced more often. And also, do not parent it before applying the instance’s properties.
-- **DON'T DO **
local Text = Instance.new("TextLabel")
Text.Parent = script.Parent
Text.Font = Enum.Font.GothamBold
-- ** DO **
local Text = Instance.new("TextLabel")
Text.Font = Enum.Font.GothamBold
Text.Parent = script.Parent
Now, for your issue/problem. Everything seems to be right as intended except for the Size property of the label. Now, IIRC (again), when creating a new TextLabel instance, there will be no default Size value provided, therefore you must do/set it on your own which in this case you haven’t.
Yes, there is a Size property for GuiObject. You could either set it manually via Studio explorer or through a script like so:
TextLabel.Size = UDim2.new(1, 0, 1, 0)
-- (X | scale, offset, Y | scale, offset)
If I may insist, you could try this code that I have rewrote from the original code that you provided on the original post:
local list = script.Parent :: Frame
-- Let's assume that the `OrderList` in the picture
-- from the post is a Frame.
local text = Instance.new("TextLabel")
text.Size = UDim2.new(1, 0, 0.175, 0)
text.BackgroundTransparency = 1
text.TextColor3 = Color3.fromRGB(0, 0, 0)
text.Font = Enum.Font.Sarpanch
text.TextScaled = true
text.Text = "Quantity: " .. MaterialOrder.Value .. " | Price: " .. MaterialOrder.Value * 0.24 .. "$"
text.Parent = list
-- We are parenting the `TextLabel` to the list.