You should not use WD 40 to try and remove scratches from your car because I tried it before myself and it actually damaged the paint.
Not only can the WD 40 damage the clear coat of your vehicles paint job it can also damage the wax job if you have waxed the vehicle.
To remove scratches from your vehicle without damaging the wax job or pain job you should wash and dry the car first and then apply some polishing compound onto a buffing wheel and go over the scratched area.
Doing that will help remove the scratch and cover it up to make it look much better.