The answer to 'what attracts centipede' is that centipedes are attracted to damp, dark, and humid environments. They thrive in areas with high moisture levels, such as bathrooms, basements, crawl spaces, and under piles of wood or leaves. Centipedes are predators and are drawn to areas where they can find their prey, like other insects and small invertebrates.
Centipedes also prefer warm temperatures, so they may be attracted to your home if it provides a suitable habitat. They can enter through cracks and crevices in the foundation, walls, or around pipes and wiring. Eliminating sources of moisture, sealing entry points, and reducing clutter can help make your home less attractive to these pests.