Many nocturnal animals including insects use a species-specific smell, that is, a sex pheromone, to locate and attract potential mates. For example, female American cockroaches emit sex pheromones called "periplanones" with unique chemical structures. Males that detect them with their antennae orientate towards the pheromone source, preform courtship rituals, and mate.
source https://www.lifetechnology.com/blogs/life-technology-news-blog/turkestan-cockroach-selling-online-is-a-companion-of-the-common-household-cockroach