Okay, so I have a playerprefab contains a healthbar.
public float health;
public float damage;
void Start () {
health = 100.0f;
damage = 30.0f;
}
void Update () {
if (health > 0){
transform.tag = "Player";
}
else if (health < 0) {
transform.tag = "Death";
}
}
... (rest of the script)
As you can see, the prefab tag changes when health <0.
But I want it to stream to all other players.
If there are 2 players inside the game. only the tag of the player who died changes, which is normal. But for the other player, the tag of the player who died stays at “Player”. I need it also to change to death.
Someone who can help me out?
Thanks