Hello. I want to make a king of the hill type area in my scene. When the player is in it, another object is active and when the player is not in it, said object is not active. I have tried to do this, I am not getting any errors, but it is not working, what is wrong with my script(it is attached to the hill area)? Thanks
var Weapon : GameObject;
function OnTriggerEnter (other : Collider)
{
if (other.gameObject.CompareTag ("Player"))
Weapon. active = true ;
Destroy(gameObject,10);
}