Hi There, I have some GuiText on my screen and I need to toggle it on and off with a Keypress. This is my JavaScript, but I get an error saying I need to add a semicolon to the first line even though it has one. Can someone help me get this working? Thanks.
GUIText myGUIText;
myGUIText.enabled = false;
function Update() {
if (Input.GetKeyDown(KeyCode.F1)) {
myGUIText.enabled = !myGUIText.enabled;
}
}