How to destroy the cube which I selected with the arrow key

The cube is the green one.
I wanted for instance press the left arrow and destroy only the left cube without destroying the others around it.

7875-picture.jpg

have a look at script to select object with mouse using mouse button, and then 3 lines to say when you press D, the selectedCollider.GameObject is destroyed.

I did it another way:
I created 4 cubes as children and used “IsTrigger.”
When I press the arrow matched the corresponding cube changes “IsTrigger” to “true”.
Works like a charm. : D