So i made this script that when it collides with a speciel object, it gets destroyed.
But when i save the script it says: Assets/Scripts/BrickHit.js(7,6): BCE0005: Unknown identifier: ‘other’.
This is the script:
#pragma strict
var Health:int = 10;
function OnCollisionEnter(collision : Collision)
{
if (other.tag == "EBall")
Health=Health-10;
if(Health==0)
Destroy (gameObject);
}
I don’t know how to fix it. I think its something with the ““other.tag”” statement.