script help gameobject to playercar

i need the gameobject to be PlayerCar (which is the only object it should collide with)

public var explosionPrefab : Transform;

function OnCollisionEnter(collidedObject : Collision) {

if (collidedObject.gameObject.tag == "Finish") {

	Destroy(collidedObject.gameObject);

}

}

.different-text-color { color: blue; }

When attached to an object, this script function should check collisions to see if they are "OtherPlayer"s or not, if so it will remove them.


public var explosionPrefab : Transform;

function OnCollisionEnter(col: Collision){
  if (col.gameObject.tag == "OtherPlayer") {
    Destroy(col.GameObject);
  }