hi i need help. i want to set a object to true or false when player enters the collider. here are my codes
public class enterexit : MonoBehaviour {
public GameObject trigger;
void Start()
{
trigger.SetActive(false);
Debug.Log(“sdafasd”);
}
void OnTriggerEnter (Collider player)
{
if (player.gameObject.tag == "Player")
{
trigger.SetActive(true);
}
}
}