problem whit input key

I can not use the keyboard input.
This is a test script. It does not work.

function DisableGuiText () {

if(Input.GetKey(KeyCode.F10)){
GameObject.Find(“Player”).GetComponent(“TextOnGui”).enabled=false;
}}

Did you call the DisableGuiText function in the script?
I would use the Update Function instead

function Update () {
if(Input.GetKey(KeyCode.F10)){
GameObject.Find("Player").GetComponent("TextOnGui").enabled = false;
}
}

ty so much!