Problem with GUITexture.color.a

Hi. Look at this snippet:

GameObject.Find("GUI Texture Pause").guiTexture.color = Color.black;
GameObject.Find("GUI Texture Pause").guiTexture.color.a = 0.4f;

First line of code works but second doesn’t. I get this message:

Assets/Standard Assets/Scripts/Pause.cs(11,65): error CS1612: Cannot modify a value type return value of `UnityEngine.GUITexture.color’. Consider storing the value in a temporary variable

Help me who can please!

The error message means you need to put it in a temporary variable and then put it back:

Color colorT = guiTexture.color;
colorT.a = 0.4f;
guiTexture.color = colorT;

If you have problems with changing alpha on run-time, check out this topic i gave answer long time ago, should help.