I would like to know if anyone has a script that makes a brick delete itself when it comes into contact with ANY another brick. It would be a great help, thanks ;)
If you have the script inside the brick that deletes itself, in this case destroy then use the touched event.
This is if anything else touches it.
1 | local part = script.Parent |
2 |
3 | part.Touched:connect( function (hit) |
4 | print (hit.. ' has touched this brick!' ) |
5 | part:Destroy() |
6 | end ) |
if you want per say a specific type of brick:
1 | local part = script.Parent |
2 |
3 | part.Touched:connect( function (hit) |
4 | if (hit.Name = = "Lava" ) then |
5 | part:Destroy() |
6 | end |
7 | end ) |