How to destroy blocks when picking up something else?

I want to know if this is possible because I cant seem to find a way to do this.
If you pick up a key, how does it destroy other blocks so that you can continue with the lvl (for example blocking the next level ‘door’)

Use the message and mailbox behavior.

A message in the key to all door objects and a mailbox trigger in the door object to destroy the it.