I tried doing this:
parts=script.Parent:GetChildren()
parts.Touched:connect(Clean)
function Clean(Part)
wait(4)
parts:Destroy()
end
(the parts are within a model)
I tried doing this:
parts=script.Parent:GetChildren()
parts.Touched:connect(Clean)
function Clean(Part)
wait(4)
parts:Destroy()
end
(the parts are within a model)
Here we go.
With the for loop, we can do this.
for i,v in pairs(script.Parent:GetChildren()) do
wait()
v.Touched:connect(function(hit)
print("boom boom bam explosion destroys")
script.Parent:Destroy()
end)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
That for loop doesn't quite fit in to this. Try showing him the link to the for pairs.