Hello!
I’m encountering a problem and I do not know what to anymore.
[Command]
void CmdStun(GameObject gO) {
StartCoroutine (getStun (gO));
}
public IEnumerator getStun(GameObject gO) {
SpriteRenderer spR = gO.GetComponent<SpriteRenderer>();
spR.color = new Color32(0, 160, 255, 255);
yield return new WaitForSeconds (2);
spR.color = new Color32(255, 255, 255, 255);
}
void Update() {
If(...) CmdStun(gameObject);
}
I don’t get any errors.
This script updates the color of the gameobject only on host (who is also a client). How can I make this to update color for all clients?