cannot reference parent network identity.netId when applying damage

Hello friends!

I’m looking to implement a custom hitbox detection system into my networked uNet FPS. I’m currently testing this on a networked bot player. I have a cube with mesh renderer disabled where the bots head should be, and layered the cube “Player Head”. On the cube there’s a networked script called Hitbox_Head, which has a reference to the bot’s parent object’s network identity.
_

Here’s the line of code that’s throwing a no object reference error
_
hit.transform.GetComponent<Hitbox_Head>().CmdApplyDamageOnServer(hit.transform.GetComponent<Hitbox_Head>().playerID, 100);

_

The debugging log is telling me the playerID variable indeed correctly outputs the players netID into console, however throwing exceptions when using this command.

_
Command:
_

    [Command]
    public void CmdApplyDamageOnServer(NetworkInstanceId networkID, int DamageAmount)
    {
        GameObject hitPlayerGo = NetworkServer.FindLocalObject(networkID);
        hitPlayerGo.GetComponent<Player_Health>().DeductHealth(DamageAmount);
    }

I put this under my raycast function and everything started working. Just in-case anyone else has similar problem.
_
NetworkIdentity playerIdentity = hit.transform.GetComponentInParent();

                if (hit.transform.CompareTag("Bot"))
                {
                    CmdApplyDamageOnServerBot(playerIdentity.netId, 100);
                    Quaternion hitAngle2 = Quaternion.LookRotation(hit.normal);
                    CmdSpawnBloodPrefab(hit.point, hitAngle2, 5);
                  //  Debug.Log("The ray hit the players head" + playerIdentity.netId);
                }