im not sure the GameObject.Find is needed, unless this is going on to an object that isn't music switch. Just try
guiTexture.texture = whatever;
that should refer to the guiTexture component upon the game object calling the script.
Also you could try just using Texture2D for your variable instead of GUITexture because a GUITexture is simply a component that accepts a Texture2D. Untested, good luck.
↧