GetComponent issue

I’m making my first multiplayer game, and much of the code is based off the official tutorial on it somewhere on the unity webpage, with modifications. Im trying to access a script called Health with GetComponent, but it dosent work, which dosent make sense because I kept all the needed parts of code from the tutorial. Heres the code for the bullet that is trying to get the Health script from whatever it hits. I know its the GetComponent because I have narrowed it down using Debug.Log.

void OnCollisionEnter(Collision collision)
    {
        Destroy(gameObject);
        GameObject hit = collision.gameObject;
        Health health = hit.GetComponent<Health>();
        if (health != null)
        {
            health.TakeDamage(10);
        }
        else
        {
            Debug.Log("No Health Script Found");
        }
    }

Simple, the object the bullet has collided with has no health script attached to it. Make sure your player has one attached to him, however it has to be attached to the part of the player that has any collider (CharacterController counts). Use Debug.Log to print out the “hit”'s name, find that object in the hierarchy and see if it has a health script on it.

Check if the hit object is the object you want hit, if the collider component of this object and Health component is in the same object if not you will need use GetComponentInChildren or GetComponentInParent.