Ok...what did you mean by "You seem a bit short for someone who is asking for help. " ? And so was I just missing the while(true)? If that was it, then io was wondering why it was moving forward normally. Anyways, I copied your code and it did weird stuff after my hand was in front of it. So thats when I realized I needed to put it so instead of one motor just going backwards instead of forwards, the other motor had to do backwards. You might be confused, but here is what I put, just had to change one thing that you put. Just look at where it goes backwards. And sorry forgot I needed to put it in a code box on my first post. This is what made it work, thanks for the help!
Edit: I also changed the distance to 25 because I couldn't keep my hand along with it, and if my hand got out of range and then back in range, it would mess up because it's not on the line and its weird. And if it gets to a turn, it doesn't take a turn it gets going backwards with no turn at all and then it keeps seeing the white on the test pad so it just keeps moving one motor. But oh well, it was just to see how well it would work.