How to change the Z velocity of character when on the ground

I am working modifying the jump and was trying to simply make it so that the velocity would get set to jump, but there were some issues with this. When I was testing this it only worked when the character was not on the floor, meaning once all requirement cases have been implemented, it will not work. It was wondering if I am doing something wrong or if there is another solution. Thanks for the help!

http://puu.sh/lzgDL/4fc49b0f3a.png