UIListLayout Textlables appearing on top of each other

HI,

I am having issues creating textlabels in a UIListLayout by code, my images is at runtime and I can see that three textlabels have been created called Q1, Q2 and Q3 but in the GUI it only shows the last one.

They look like they are stacked on top of each other, Any thoughts as to why its doing this? creating them manually works just not in code.

for i in QuestsActive do
			
			QuestsTotal = QuestsTotal + 1
			
			print("DESCRIPTION >>> " .. tostring(QuestData[QuestsActive[i][1]].Description))
			print("NAME >>> " .. tostring(QuestData[QuestsActive[i][1]].Name))
			print("REWARD >>> " .. tostring(QuestData[QuestsActive[i][1]].Reward))
			
			
			local textLabel = Instance.new("TextLabel")
			textLabel.Text = tostring(QuestData[QuestsActive[i][1]].Description .. " - Reward " .. QuestData[QuestsActive[i][1]].Reward)
			textLabel.Parent = QuestFrame
			textLabel.Name = tostring(QuestData[QuestsActive[i][1]].Name)
			textLabel.Size = UDim2.new(1, -15, 0, 40)
			textLabel.BackgroundColor = BrickColor.new(78, 148, 3)
			textLabel.TextWrapped = true
			textLabel.Font = "Merriweather"
			textLabel.TextSize = 20
			textLabel.Parent = QuestFrame

			script.Parent.QuestFrame.TotalQuests.Text = "Total Quests " .. tostring(QuestsTotal)
			
		end
1 Like

Hi

I found out how to fix, I had set UIListLayout padding to 5,5. If I set to 0,0 it works but dont know why?