Hello, so I put together a script that would destroy the object that has the script if it hits the player. However, the object does not break. The script is
//function OnCollisionEnter (hit : Collision)
function OnTriggerEnter2D(hit : Collider2D) // if using 2D Colliders
function OnTriggerEnter(hit : Collider) // if you're using normal Colliders
Both game objects need a Collider (Such as BoxCollider2D).
The non-player collider will need “Is Trigger” to true. Non-player object will also need your script.
The player object will need a RigidBody, set “Is Kinematic” to true;