Unet Collision Weirdness?

So I have a networking game in which players shoot spells and what not at other players (I know its nerdy). I have ran into a problem where I have a fireball comet thing come down and explode. While I would assume it would just require me to spawn the explosion on the network and use a sphere collider to see if any player was hit and to deal damage. Unfortunately this works too well and after one player is already hit by an explosion, no matter where the next explosion spawns in the scene it will deal damage to the player that was previously hit. It does say something about not finding a target to sync with which may be the problem but I am not sure how to fix that. Thanks for the help!

// Mage script section where it spawns the explosion

[Command]
	void CmdCommetExplosion () {
		GameObject _commetExplosionInst = Instantiate (commetExplosion, cometStrikePos, new Quaternion (0, -90, -90, 0));
		NetworkServer.Spawn (_commetExplosionInst);
		string thisPlayersID = gameObject.GetComponent<playerSetup> ().IDTag;
		splashDamage.setCastersId (thisPlayersID, commetExplosionRange);
		GameObject _player = splashDamage.getPlayerWeHit ();
		if (_player != null) {
			if (_player.GetComponent<playerStats> () != null) {
				float _dammage = this.gameObject.GetComponent<playerStats> ().DetermineDamage ();
				CmdTakeDamage (_player, _dammage);
			}
		}
	}

	[Command]
	void CmdTakeDamage (GameObject _player, float _dammageAmount) {
		_player.gameObject.GetComponent<playerStats> ().TakeDamage (_dammageAmount);
	}

// Script attached to the explosion with sphere collider

using System.Collections;
using System.Collections.Generic;
using UnityEngine.Networking;
using UnityEngine;

public class splashDamage : NetworkBehaviour {

	public static string ID;
	public static GameObject playerWeHit;
	public static float Range;

	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {
	}
		
	public static void setCastersId (string playerID, float _range) {
		ID = playerID;
		Range = _range; 
	}

	public static GameObject getPlayerWeHit () {
		return playerWeHit;
	}
		
	void OnCollisionEnter (Collision col) {
		if (col.collider.gameObject.name != ID) {
			playerWeHit = col.collider.gameObject;
			Debug.Log ("hit " + playerWeHit.name);
		} 
	}
}

Is see a flaw that can be the source of your problem : if you execute the CmdCommetExplosion and hit someone, you record the player in splashDamage, and if you call it again, you do not reset playerWeHit so event if you don’t hit someone, the splashDamage will always return the last player hit (and I don’t see an initilization of splashDamage, so I assumed it is never reset).

I think your architecture is a bit complicated. What I would do would be :

  1. Create an explosion and set an ID int it which the ID of the caster.
  2. Spawn it in the network.
  3. When OnCollisionEnter occurs check that the ID contained in the explosion is not the id of the player that is collisioned.
    Which sound a bit simpler ^^

Hope it helps !

EDIT : if it is still unclear for you let me know and I can provide a more detailed answer