To prevent pigeons from roosting on your roof, consider installing bird spikes on ledges and perching spots, using scare devices, or creating an uneven surface with angled or sloping materials. This makes it challenging for pigeons to land and stay.