Animate a vertical line

I want to show my students the vertical line test passes by animating a vertical line through my graph but I can’t figure out how to do it. I don’t want the vertical line to appear until they press a button.
Thanks!

Here are two different takes on what you’re looking for:

To activate the T from user input, simply make the T work like this:

number("T"): button.timeSincePress()

Thanks! I think I got it! The only problem I am having now is that I want the vertical line to bounce back and forth across the graph but it is not.

This will do the bouncing for you: