Is there a way to transform location for only the z-axis?

Thanks Noah, I was able to make it work. I appreciate it.