The text isn’t changing when I enter a Collider
Im new to unity so I don’t know why this isn’t working.
public class InSecurityEvent : MonoBehaviour
{
public bool EnteredTrigger;
public GameObject CollisionWith;
public Text ToDo;
public void OnTriggerEnter(Collider other)
{
if (other.tag == "SecurityCollider")
{
EnteredTrigger = true;
CollisionWith = other.gameObject;
ToDo.text = "Go to the monitor and press E.";
}
}
}