This might seem like a funny question, but if you live somewhere that raccoons are getting close to the residential areas, it is not. Raccoons are going to arrive in short order if there is a reason and the biggest reason is food. That does not mean that they are looking for food on your roof, but your roof might have been the easiest way out of a tree that is nearby. With the different styles of roofs on homes these days, there could even be a place for the raccoon to live on your roof. All they need is cover from the sun and elements and they are set. You might find one curled up under the eave, or even trying to find its way into the attic through a vent in the roof.
Both of these scenarios are not good, but if you find yourself in one of them, there are ways to capture the raccoon and hopefully put a stop to them being on your roof. Getting into your attic might not be easy, but even the largest raccoon can slip through the smallest hole, so make sure you are checking your roof areas each year for places they can get into. Even if you do have a single tree near your roof, raccoons are excellent climbers and can get to just about anywhere they want to go. They can climb up the corner of your home, or even up your downspout, but the odds are they will take the easiest route and that could be as simple as a tree. Keep an eye on them if you can, slowly remove the ways they can get on the roof and the problem should fix itself.
Raccoons are not easy to catch and it is not recommended that you deal with removing them on your own. Wildlife trappers can set a trap for them and come to complete the removal process should you find the raccoon trapped one day. If the raccoon can get into your attic, which is the reason they are on the roof, all you have to do is eliminate the hole they are climbing into and problem should be solved. If you can get into your attic, make sure there is no light coming in, indicating a way they can get in there to find shelter. Because you are not likely feeding them on the roof, needing shelter would be the main reason they are there. If they are getting into your trash, that is another story. If you have to set a trap, make sure you check it daily to make sure the raccoon is not getting cooked by the sun and dies that way.
Many trappers can relocate a raccoon to a wooded area where they would be better off. Because raccoons are more likely to be wandering during the night, you have to be very diligent about watching for them and catching them as they get onto the roof. Many people would set up trail cameras with hopes of seeing them during the night and this is a good first step. Once you know how they are getting onto the roof, you can eliminate that and move to the next step. Remember that more homes are moving into rural areas and this can be part of the reason that you have a raccoon problem. You built a home where the raccoons are used to living and sleeping and now it might become a problem for you.
No matter how the raccoons got on your roof, there are three simple things you can do to make sure they are not arriving on your property in the first place. Make sure you clean up all of the garbage, food, papers or berries that might fall from trees. These are simple things that give raccoons a reason to come around. Get metal trash cans and make sure they have lids on them. Most raccoons will not work very hard to get to the trash, but a plastic can without a lid can be seen as an invitation. When removing the trash, always keep the trash cans clean so smells are not attracting the raccoons. Keep in mind they are looking for something, so take that away and your problem will be solved in most cases.