Hey all! I have this script to allow the player to click a piece of paper and a gui texture appears on the screen to allow them to read the paper. When I click the paper, however, it isn't working. Any help?
var email : GUITexture;
function Start() {
email.enabled = false;
}
function OnMouseDown(){
if(gameObject.tag == "paper")
email.enabled = true;
}
function Update() {
if(Input.GetKeyDown(KeyCode.E))
{
email.enabled = false;
}
}
Trending Articles
More Pages to Explore .....