Why can't I change the Texture of my GUITexture?

Hey there,

I have an array containing two Texture2Ds, I want to be able to change the Texture2D of the GUITexture that I am instantiating, here is the code I am using:

var n = Random.Range(0,2);
Debug.Log("N : " + n);
var scoreAlert = Instantiate (scoreMessage);
scoreAlert.texture = scoreMessageTexture[n];

However I always receive the error 'texture' is not a member of UnityEngine.Object

Instantiate returns Object; you need to cast it to GUITexture.

var scoreAlert = Instantiate (scoreMessage) as GUITexture;