Why is my code displaying 3 items and not 5

Hello!

I am trying to make the best update log possible. However, when i am creating the template, it only displays 3 objects from my table and not 5.

 --// CONFIG \\--

local UpdateName = "Update 1" -- Will be displayed at the top
local UpdateDay = "5/1/24" -- Will show the date below the update name

local UpdateIconID = 14889741118 -- Change to update id

local UpdateFeatures = { -- Will create a template with the update featured entered
	"Test 1",
	"Test 2",
	"Test 3",
	"Test 4",
	"Test 5",
}

--// SETUP \\--

task.wait(2)

local Frame = script.Parent
local UpdateNameLabel = Frame:WaitForChild("UpdateName")
local UpdateDateLabel = Frame:WaitForChild("Date")
local UpdateIcon = Frame:WaitForChild("UpdateIcon")

UpdateNameLabel.Text = UpdateName
UpdateDateLabel.Text = UpdateDay
UpdateIcon.Image = "rbxassetid://"..UpdateIconID

--// CREATE TEMPLATE \\--

local Container = script.Parent:WaitForChild("Container")
local Template = script:WaitForChild("Template")

for i, v in ipairs(UpdateFeatures) do
	--print(v)
	
	local ClonedTemplate = Template:Clone()
	
	ClonedTemplate.Parent = Container
	
	ClonedTemplate.TextLabel.Text = UpdateFeatures[1]
	table.remove(UpdateFeatures, 1)

end

Please help!

Thanks!

Why do you remove items from the table when you can just get the “v” value or UpdateFeatures[i]

1 Like

I thought that would just put all the features on 1 text label. Wouldn’t it?

Nevermind then lol, my small brain finds it difficult to comprehend coding lol. Thanks for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.