Trying to get a simple bit of GUIText to fade in and out using transparency. Wrote a script that should only affect one GUIText but all of them are fading in and out. What am I doing wrong?

[Fade in/out script][1]
[1]: http://pastebin.com/print/Aq63gQVu

I’m not sure if I put that link in correctly. Apologies if not.

Basically, gameovertext is a GUIText in my implementation of the Space Shooter tutorial, but the script is making all other GUIText fade in and out with it, even though I’ve implemented the reference to the GUIText in like the most specific way I can imagine.

What am I doing wrong here?

I think this is because you are changing the color of the material of the font. Since all your text probably uses the same font, this will change the material of all those text objects.

I copied your code and removed “.font.material” from all the places you changed the color at, and it works fine for me now.

I also switched from GUIText to UI/Text which has replaced GUIText in newer versions of unity, but this should work the same with GUIText.