How to Move my Pawn up on z axis on key press and return to its previous location on release

Thanks for the reply. it works well. But when released its not returning to the position from where it bounced up. becoz of the vector value is negative it keeps falling down on release