How to Code a Destructible Object When Clicked

Last updated: January 15, 2025

  1. Create an Object / Prop that you want to destroy when clicked

Props Menu 2. Select the Object / Prop created and open the Code Builder

Code Builder3. Click on the Event Block section. Drag the When Player clicks Object block.

Events Block

  1. Click on the Control Block section. Drag the Destroy Object block and place it /attach it under the When Player clicks Object block. Now, when you press Play and click on the object, it will get destroyed!

Control Block

Was this article helpful?

Thanks for your feedback!