How do I create stacking in this roblox gui

Hello, how do I stack roblox gui for an example I have text and everytime i run the function it creates a textlabel on top of it.

Change the ZIndex of each GUIObject so it is higher than the last GUIObject.

How do I make a script that watches if there is already a label

Could you post your current script?

Here is the script: `local label = script.Parent.NotificationLabel
local udim2label = label.Position
udim2label = label.Position + UDim2.new(0, 0,0.100, 0)

function createpopup(text)
local templabel = label:Clone()
templabel.Parent = script.Parent
templabel.Position = label.Position
templabel.Text = text
templabel.Visible = true
wait(1)
templabel:TweenPosition(udim2label,Enum.EasingDirection.Out,Enum.EasingStyle.Quint)
end

while wait(0.5) do
createpopup(“cool test”)
end
`