private bool ColorIng = false; private SkinnedMeshRenderer primaryRenderer; IEnumerator HitColor() { if (ColorIng) yield break; ColorIng = true; Color t = primaryRenderer.material.color; primaryRenderer.material.color = Color.red; yield return new WaitForSeconds(0.2f); primaryRenderer.material.color = t; ColorIng = false; }