Getting GUI on object destroy

Hey, I have this script on a game object. When the game object gets destroyed I would like a GUI texture to show up. This is what I wrote, it will let me play but it is not showing the picture. I do have a texture in the var slot. Here it is:

var picture : Texture2D;

function OnDestroy () {

guiTexture.texture = picture;

}

Thanks for help

GuiTexture docs

Maybe this helps:

I guess when the object destroyed, there is no picture variable anymore, that’s your problem.