Droping a box by pressing space or any key

Hello !
I’m stuck at this part of my game. How can i drop a box by pressing space or any key and then returned into the same place that was initially.

I’m thinking you’ll need to watch for a key press, then use something like Lerp() to move it on the y-axis. I’m not exactly a code guru and am fairly new to Unity, so hopefully this at least points you in the correct direction.

 if ( Input.GetKeyDown(KeyCode.Space)){
    transform.position = Vector3.Lerp(transform.position, target.position, speed)

I believe that will move it initially, then you would just need to run another Lerp() to get it back to the original location (if you need the motion to be smooth - if not, just update the transform.position.y property and it should snap back to the original location.

Sincerely hoping this helps,

Edited for spelling