So basically, what I have is a model made up of several different meshes and so that means I also have a few separate colliders, and all of the meshes are parented to a single empty Gameobject that holds everything together and contains all the scripts. Here’s an image to give you an idea of what I’m talking about:

Now I figured that I could put a SendMessageUpwards onto my projectile so that when it hit any part of the ship, it would send ApplyDamage to the Gameobject with the script on it. Am I doing this wrong? Am I using ApplyDamage incorrectly? I’m still a relatively novice programmer, so excuse my organization on the following scripts:
The ProjectileManager.cs (Goes onto the projectile itself. The IENumerator is to destroy the projectile after a while so that there aren’t hundreds of irrelevant projectiles flying around in the void):
using UnityEngine;
using System.Collections;
public class ProjectileManager : MonoBehaviour {
public float dmg = 25.0f;
void Start () {
StartCoroutine(destroyaftertime());
}
void OnCollisionEnter(Collision collision){
Destroy(gameObject);
Debug.Log("hit!");
collider.SendMessageUpwards("Damage",dmg,SendMessageOptions.DontRequireReceiver);
}
IEnumerator destroyaftertime(){
yield return null;
yield return new WaitForSeconds(10);
Destroy(gameObject);
}
}
And this is my ShipAttributes.cs (This goes on the parent of all the ship parts):
using UnityEngine;
using System.Collections;
public class ShipAttributes : MonoBehaviour {
public float Health = 100.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Health <=0.0f){
Destroy(gameObject);
}
}
void ApplyDamage(float dmg){
Debug.Log("OUCH!");
Health -= dmg;
}
}
Also, I am using this with Photon, so I am instantiating the players, if that makes a difference. Here is how I’m going about that:
void SpawnMyPlayer() {
SpawnSpot mySpawnSpot = spawnSpots[Random.Range(0, spawnSpots.Length)];
GameObject myPlayer = (GameObject)PhotonNetwork.Instantiate("FighterShip", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation,0);
There’s more there in SpawnMyPlayer, but it’s just enabling scripts on the player, and I’ve already made sure that ShipAttributes is enabled when the player is created.
Help would be appreciated, I’m stumped!