hi im having a probelm im trying to make a ammo box and make it so that when i pick it up the box gets destroyed and im trying to us a vtc course but it seems not to work for me i even tryed to use raycasting but nothing im trying to make this happen upon collision here is my scrip
but nothing happens when i run into the box
and the box is taged
static var GRENADE_AMMO = 1;
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if(hit.gameObject.tag == "crateGrenades")
{
//destroy the ammo box
Destroy(hit.gameObject);
//add ammo to invetory
GRENADE_AMMO += 10;
}
}