how to destroy all parts with the name "Test"?
(not only in workspace but also in models in workspace)
how to destroy all parts with the name "Test"?
(not only in workspace but also in models in workspace)
local descendants = game.Workspace:GetDescendants()
-- Loop through all of the descendants of the Workspace. If a
-- BasePart is found, the code changes that parts color to green
for index, descendant in pairs(descendants) do
if descendant.Name = "Test" then
descendant:Destroy()
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.