"IF"

I know there has been a question like this but not quite exact. I want to know if there is a way to “destroy” a certain block that is in front of you?

Make the player object emit an object that makes the object destroy itself? I think that’s good

Thanks!