I am a newby and have been on this for a few days…Can anyone tell me what is wrong? Thank you so much for your consideration.
var goGlow : GameObject;
function Start(){
stopGlow = GameObject.FindWithTag("StopGlow");
stopGlow.renderer.material.color.a = 0f;
goGlow = GameObject.FindWithTag("GoGlow");
goGlow.renderer.material.color.a = 1f;
}
function Update()
{
if ( Input.GetMouseButtonDown(0) && GameObject.FindWithTag == "StopSign"
&& Time.timeScale==1)
{
Time.timeScale = 0;
stopGlow.renderer.material.color.a = 1f;
goGlow.renderer.material.color.a = 0f;
print("im here");
}
else if(Input.GetMouseButtonDown(0) && GameObject.FindWithTag == "GoSign"
&& Time.timeScale ==0)
{
Time.timeScale = 1;
stopGlow.renderer.material.color.a = 0f;
goGlow.renderer.material.color.a = 1f;
}
print(Time.timeScale);
}