How do I make it so that in a platformer it tracks height?

Here’s the one I found with pictures.