- Home /
 
               Question by 
               Blade666 · Oct 25, 2015 at 12:24 AM · 
                javascriptcollisiontriggertagboxcollider  
              
 
              Trigger not detecting tag
When a car passes though the trigger only my one should debug but the other cars with different tags debug and i do not know why? here is my script
 #pragma strict
 var Lap: int;
 function Start () {
     Lap = 0;
 }
 
 function Update () {
     if (Lap ==3);    
 }
 
 function OnTriggerExit(other : Collider)
 {
  if(other.tag == "Player");
     Lap++;
     Debug.Log("Passed though");
     
 }
               Comment
              
 
               
              Answer by MrMeows · Oct 25, 2015 at 04:37 AM
Your script looks fine. Check the children of the other cars. I am guessing one of them is tagged Player.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                