Why isn't this script working?

Please use code tags .

Make sure you save the script before you switch back to Unity. The vertical, yellowish bars on the left indicate that the corresponding lines have unsaved changes, i.e. they’ve either been added or edited.