I am trying to change the material on multiple objects by pressing a button. Unfortunately I have only succeeded in making one object change material. I’m sure its something simple, but I just can’t see it. Here’s my current script. Any help would be appreciated.
#pragma strict
var materialchange1 : Material;
function Update () {
if (Input.GetButtonUp("mat")) {
GameObject.FindGameObjectWithTag("score").GetComponent(Renderer).material = materialchange1;
}
}