In pairs loop not destroying all parts

I want to destroy all parts after a remote event, but not all got destroyed.

for i,v in pairs (workspace:GetChildren()) do
		if v.Name == "Clones" then
			print("Total")
		end
	end
	remote.OnServerEvent:Wait()
	for i,v in pairs (workspace:GetChildren()) do
		if v.Name == "Clones" then
			v:Destroy()
		end
	end
	
	for i,v in pairs (workspace:GetChildren()) do
		if v.Name == "Clones" then
			print("Not destroyed")
		end
	end
	print("Fired")
	wait(20)
	game.ReplicatedStorage.Timestart:FireAllClients()
	print("Firedclients")

Total printed 780x, while Not destroyed printed 660x.
TL;DR : I have 780 parts that want to be destroyed, but only 120 got destroyed.

maybe

for i,v in pairs (workspace:GetDescendants ( )) do
    pcall(function()
        v:Destroy()
    end)
end

to Destroy every thing in workspace

Oh, sorry for not clarifying, I only wanted to destroy parts named “Clones” in workspace

well that is either cause the clones don’t exist in workspace or you just misspelled the spellings

But it already is named clones in the workspace. and I didnt misspelled it

welp then it use prints to see where it stops

It runs perfectly well, but only 120 parts named clones got destroyed. So not all parts named clones got destroyed like I wanted to.

i see what happening here

	for i,v in pairs (workspace:GetDescendants()) do
		if v.Name == "Clones" then
			v:Destroy()
		end
	end
	
	for i,v in pairs (workspace:GetDescendants()) do
		if v.Name == "Clones" then
			print("Not destroyed")
		end
	end

It prints Clonesis destroyd (x780), but I see some that arent destroyed

Under it, from this code
‘’’
for i,v in pairs (workspace:GetChildren()) do
if v.Name == “Clones” then
print(“Not destroyed”)
end
end
‘’’
prints Not destroyed (x660)

Pairs are for dictionaries, not arrays.
Maybe it would destroy all parts if you changed pairs to ipairs.

For example:

for i,v in ipairs(workspace:GetChildren()) do
    if v.Name == "Clones" then
        v:Destroy()
    end
end

pairs and iPairs

It is still the same result as before

can you please send us your game file so i can see what is wrong

do you somehow add “Clones” named parts when game starts or something like that

Edit: Like script which adds it

Not at all, It still is named “Clones”

can you try this and tell me if it happenes again

while true do
   for i,v in ipairs(workspace:GetChildren()) do
    if v.Name == "Clones" then
        v:Destroy()
    end
end
wait()
end

or maybe

repeat
for i,v in ipairs(workspace:GetChildren()) do
    if v.Name == "Clones" then
        v:Destroy()
    end
end
until not workspace:FindFirstChild("Cloned")

I got the same result as before

can you please send us the whole script?

ipairs and pairs kinda work the same btw