I have a simple pick up object which the player picks up and the it’s supposed to the the manager script to do something but it doesn’t
Void OnTriggerEnter(collider other)
{
If(other.gameobject.comparetag("Pick up"))
{
GameManager GameManager = FindObjectOfType<Gameobject>();
GameManager.EndLevel(false);
}
Debug.Log("pick up collected");
}
I do have other things in the same script that calls for the game manager and work fine it’s just this bit doesn’t seem to work and just so you know the debug bit works