if(hit.gameObject.name==“Red2”)
{
//print(“Hit”);
hit.gameObject.collider.enabled=false;
hit.collider.enabled=false;
yield WiatForSeconds(1);
hit.gameObject.collider.enabled=true;
hit.collider.enabled=true;
}
This code using to enabled and disabled.but the process is continuously in the scene. each and ever one seconds enabled and disable process is occurred.
I need only one time of hitting after occurred the enable and disabled
pls help other.