#pragma strict
internal var fading : boolean = false;
function Start () {
yield WaitForSeconds(1.2);
fading = true;
}
function FixedUpdate ()
{
if (fading ==a true)
{
this.renderer.material.color.a = this.renderer.material.color.a-0.01;
}
}
I am using this simple script to fade the color of a projectile. The first one works correctly, but all projectiles after that come out with an alpha of 0. How can I fix this/what is going wrong?