If you try to visit before obtaining your sixth badge, you won't be able to enter. After defeating the Laverre City Gym, your friends will meet up with you outside of the gym and tell you they plan to visit the factory. They'll clear the way, allowing you to enter. Before going inside the Poke Ball Factory, explore the hedge mazes in the front. Above the Max Revive is a hidden Hyper Potion at a dead end. Take the bottom path of the maze to find a hidden Poke Ball at the dead end. Take the middle path of the maze to find a hidden Burn Heal at the dead end. The last thing to grab before going inside is a hidden Dusk Ball at the northwest corner of the area. With all the items accounted for, head inside the Poke Ball Factory.

Poké Ball Factory
Navigation menu
Once in the Factory defeat the grunts You encounter. Follow the conveyor belt until You get to the section with stairs. Go up. Talk to the hostages in the upper left room of the higher ground, then head to the lower left of the room and change the direction of the conveyor by pressing the switch. Return downstairs, into the centre of the room and head north and take the, now going in Your destination, conveyor belt on the right and take the stairs when You get to them. Head to the room on the upper right of the second level. Battle and leave. Return to the town and go east.
Shauna and Trevor are standing outside, saying that someone won't let them into the factory. Shauna runs north to try to get in again. Then your neighbor and Tierno arrive. Tierno runs off to help them, and your neighbor says to check out the factory while the guard is gone. Go north through the gates, then go east into a shrub maze.
The factory is mostly automated and only a few people reside there to observe the process. The factory area consists of the factory itself and the yards, where two small hedge mazes reside. Inside the factory, two conveyor belts run through the building, allowing the player to move around. The direction of the conveyor belts can be temporarily reversed from a computer at the southwest corner of the facility.