Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Destroy script not working properly?

Hello, I have a problem with my script, can someone help me?

local Parts = game.Workspace.Parts:GetChildren()

for i, v in pairs(Parts) do
     v:Destroy
     wait(1)
end

1 answer

✓ Accepted answer

Here you go:

local folder = workspace.Parts

for _,v in pairs(folder:GetChildren()) do
	v:Destroy()
end

1 comment

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.