function boom(p)
local check = nil
local list = game.Workspace:GetChildren()
for i=1,#list do
if list[i].ClassName == p then
return list[i] and list[i].Name
end
end
end
while wait() do
local target = boom('Part')
if target then
print(target)
target():remove()
end
end
basically i am trying to get it to remove 1 part and print the second return if i could get help dat would be cool

2 comments
Edited to add code block
See: https://scriptinghelpers.org/questions/15014/what-are-tuples