# How to make a moving emission shader?

How can I have a part of an object be an emission shader and then have the emission move up the object ans start at the bottom again?

So for instance: I have a cylinder that has a normal principled shader and a ring that is an emission shader. I then want to have that emission part move up and down the cylinder. So that the glowing part moves up and down the cylinder. Or have it start at the bottom, move up and start at the bottom again. I am assuming I could just make a separate object with an emission shader that moves up and down the cylinder. But I would love to learn how to do it in 1 shader. If possible at all.

To change the position of the ring (in realtime), I used a Value Node with the value set to #frame (just type it in the box) - this makes the value change with the frame number when you animate. To control the up/down motion of the ring, I used a Math Node set to sine, as it will return a value that cycles between -1 and 1 as the input (frame number) increases. I connected this to the location input of the mapping node (which only affects the Z axis, due to the separation of axes beforehand).