One of the most valuable abilities you can use in Pokémon Brilliant Diamond and Shining Pearl is the TM 94, Fly. With it, as an HM, you’ll be able to immediately travel to towns you’ve previously visited in the game, cutting your travel time down by a considerable amount. But you’ll need to find this item first. Here’s where you need to go to find TM 94 Fly in Pokémon Brilliant Diamond and Shining Pearl.
You’ll be able to access TM 94 when you defeat the third Gym Leader, Maylene. Immediately after you depart the gym after this encounter, you’ll meet with Dawn, who informs you that Team Galactic stole her PokéDex, and she needs your help. You can assist her after you’ve recovered your Pokémon at the city’s Pokémon Center. You can find her on the north side of the town, just outside the Team Galactic Warehouse.
After defeating the two Team Galactic members, you’ll return Dawn’s PokéDex to her. She’ll leave the area, thanking you for your help. Next, you’ll have to go inside the Warehouse that the two Team Galactic members were protecting. Inside, you’ll find a Poké Ball on the ground, and it will contain TM 94 Fly. You can now use it while outdoors to travel to towns you’ve already visited, and because you’ve defeated Mayleen, you can use it whenever you want to use it.