I have created a door that i want to open automatically when the player gets close enough to trigger the trigger area what function should I use. I have been tring OnTriggerEnter but can not seemto get the first part of the argument to be accepted`
var player = gameobject.tag(“Player”);
function OnTriggerEnter(player : collider)
function OnTriggerEnter (CharacterController : Collider)function OnCollisionEnter(collision : Collision){ if(collision.gameObject.tag == "Player"
those are the three i have tried with no sucsess`