Raycast can't detect gameobject

I’m trying to make a simple fighting game.
I figured I’d use Raycast to check if the opponent is in range, but encountered a problem. My Raycast can’t detect the other player.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class player_1 : MonoBehaviour {

    public float reach = 2;
    public bool inRange = false;

void FixedUpdate ()
    {
RaycastHit hit;
        Ray punchRay = new Ray (transform.position, Vector3.right * reach);

        Debug.DrawRay (transform.position, Vector3.right * reach);

        if (Physics.Raycast (punchRay, out hit, reach)) {
            if (hit.collider.gameObject.tag == "player_2")
               inRange = true;
        }
}
        }

Hope you can help.

print out the tag of the hit. Check to see that the raycast is not hitting the source object or something else is in the way.

Debug.Log(hit.collider.tag);

What do you mean “inRange” like distance or trajectory/