Trigger stops working then once I exit it then re-enter it it works.

Hi there! Pretty much what the title says. The trigger is constantly switching to active and inactive so sometimes it fails to detect if it is triggered or not. Also I noticed that if I make the collider bigger it has a harder time detecting if it’s triggered or not. Any help is appreciated :slight_smile:

///////////////////////////////////////////
bool Triggered;

void OnTriggerEnter(Collider Trigger)
{
    if (Trigger.gameObject.CompareTag("Ball"))
    {
        Triggered = true;
    }
    else
    {
        Triggered = false;
    }
}

void OnTriggerExit()
{
    Triggered = false;
}
///////////////////////////////////////////

I figured out that I accidentally copied some part of a different script relating to triggers into the one i was having the problem with. I’m just a big idiot is all XD. thanks for trying to help anyway :slight_smile: