I tried doing this:
1 | parts = script.Parent:GetChildren() |
2 | parts.Touched:connect(Clean) |
3 |
4 | function Clean(Part) |
5 | wait( 4 ) |
6 | parts:Destroy() |
7 | end |
(the parts are within a model)
Here we go.
With the for loop, we can do this.
1 | for i,v in pairs (script.Parent:GetChildren()) do |
2 | wait() |
3 | v.Touched:connect( function (hit) |
4 | print ( "boom boom bam explosion destroys" ) |
5 | script.Parent:Destroy() |
6 | end ) |
7 | end |