First, if you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
Go read the docs for Input.GetKeyDown()
- it has to be used in Update()
- it only returns true on the one single frame that the key goes down.
Are you looking for Input.GetKey()
perhaps?