I am creating a dance show game and I want to show the players name and their sequence in a list before each round. I am using clone which creates a new label for each player. My issue is that the cloned list is not getting removed after round 1 and the players name are duplicated. Here is my code
contList.OnClientEvent:Connect(function(Contestants) ---Remote event in local script
for i=1,#Contestants do
nameList = script.Parent.List.plrsList.nameList:Clone()
nameList.Parent = script.Parent.List.plrsList
nameList.Name = Contestants[i].Name
nameList.nList.Text = Contestants[i].Name --players name
seqNo = script.Parent.List.sequence.seqNo:Clone()
seqNo.Parent = script.Parent.List.sequence
seqNo.Name =i --sequence number
seqNo.sequence.Text = i
List = script.Parent.List
end
List.Visible = true
wait(10)
List.Visible = false
for i=1,#Contestants do
nameList:Remove()
seqNo:Remove()
end
end)