Destroy on touch

Hey everybody,

I tried to make a script like when I touch an object (android touchscreen) it destroys it. How do I make this or is there anybody that already has this script? Thanks!

so the first problem is finding a way to touch an object on mobile
unfortunately you cant use an onMouseDown

(other people might have a better solution )
but i would try raycasting from the cameras position in the direction of the mouse touch
or if its top down you could just use the touches x and z locations for the raycasts origin and set the Y to whatever

after that you just tell whatever the raycast hits to do whatever you want