having problems with my colliders

im working on a space ship shoot em up game and my ship just goes through enemies ive attatched a script to it but it doesnt work

function OnControllerColliderHit(hit : ControllerColliderHit) {
    if (hit.collider.tag == "Death") {
        transform.position = Vector3(0,5,0);
    }
}

it just goes through objects =(

Did you remember to tag what it wants to collide with? Have you tried dumping a Debug.Log("I've been hit!"); in there to make sure the collision is even taking place? Could your movement script be ignoring or overriding this in some way? Are you using rigidbody on any of the objects in question and if so, which and how?

I’m not a UnityScript/JavaScript natural and still pretty new to coding in general, but it seems like that’s pretty accurate to me, so I would recommend doing a few little checks like the Debug.Log and such, and if you can’t find the problem post some more info unless someone counters what I’ve suggested by pointing out a flaw in your syntax.