in unity multiplayer with Mirror, when a player shoots another player, only the player who shoot gets dealt damage

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Mirror;

public class Gun : NetworkBehaviour
{
public Transform RenderCam;
public RaycastHit hit;
public float range;
public float Damage;
public float Firerate;
public float Timer;
public Transform barrelpos;

public int ClipSize;
public int CurrentClipAmount;
public int ReserveAmmo;

public Text ammo;

private void Start() {
    Timer = Firerate;
}

private void Update() {
    Timer -= Time.deltaTime;
    ammo.text = CurrentClipAmount + " / " + ReserveAmmo;
    if(Input.GetMouseButtonDown(0) && Timer <= 0 && CurrentClipAmount > 0) {
        CurrentClipAmount -= 1;
        Timer = Firerate;
        Shoot();
    if(Input.GetKeyDown("r")) {
        ReserveAmmo -= ClipSize - CurrentClipAmount;
        CurrentClipAmount = ClipSize;
        Timer = 1;
    }
}

void Shoot() {
    Physics.Raycast(barrelpos.position, RenderCam.TransformDirection(Vector3.forward), out hit, range);
    hit.transform.GetComponent<PlayerStats>().TakeDamage(Damage);
}
}

}

@EggCartonGames511 , I would check if the barrel position is outside of your player collider. Also check out this link on Mirror Documentation. I"m pretty sure you want to use the Command attribute

 // command to send to server, make sure to validate on the server and send 
// a [ClientRPC] back to the enemy you want to lose health
 [Command] 
 void Shoot() {
     Physics.Raycast(barrelpos.position, RenderCam.TransformDirection(Vector3.forward), out hit, range);
     hit.transform.GetComponent<PlayerStats>().TakeDamage(Damage);
 }