Cat nuisance can be embarrassing and requires well balanced approaches to deal with it. You can apply one of the following options to deal with cats:
Cayenne pepper: sprinkle it around the car. This is because it is a product that is known to put off cats within a few days. Do not sprinkle it on the car.
Mothballs: you can buy and spread these balls around your car and on top of its roof. It produces a strong smell that cats hate and keeps them off.
Ultrasonic pet repellent: this is set off by a built-in infrared motion detector, and it scares away cats through ultrasonic waves that are inaudible to human ears. It is quite affordable and it can be easily set in places such as car roofs.