How do i make a vertical bar to reveal the image underneath? [closed]

I have a little bit of a problem and i don t know how to approach it. So basically I have to pictures of a car, identical, one is scratched and one is not. The two images are overlaped and have a vertical bar in the middle. To the left of the bar only the scratched image is visible to the right only the normal one. As i drag the bar to the left, what is to the right of the car turns into the normal image. Vice versa if i move the bar to the right, whatever is to the left of the bar turns into the scratched car.

I have tried a lot of things but nothing seemed to work.