I had a raccoon pooping under my deck. I installed a motion detecting sprinkler to keep it away. In just a few days, the raccoon figured out that it could safely go behind the sprinkler to do its business. Now my deck is completely enclosed to stop them getting underneath.