At five weeks, they still need the close contact of their mates. It's a security blanket, so to speak.
Tonight I moved my four-week old chicks to their coop. They've been sleeping under a heating pad frame and barely fit. It's one reason I moved them into the coop from their brooder pen in the run.
I enclosed them in the coop a few hours before bedtime to get them comfortable with their new home. They were having a good time for those few hours before sunset to explore and play. They were all even roosting on the perch quite high off the floor.
Then bedtime arrived and such caterwauling you would not believe. The poor waifs were absolutely overwrought with angst at not having their heating pad to crawl under. Finally, I went and fetched it and plugged it in, setting it on the lowest setting. Just as a wound up disgruntled toddler is slow to be consoled, so it was that my chicks took some time to discover the familiar warm frame that had appeared.
All seemed to recognize it at the same time, and they all charged in under it, the cries of despair turning to contented trilling. It was pretty funny seeing the frame jostled and jumping as they all crammed together under it, barely fitting.
They are still babies tonight. In a week they will be all grown up and roosting on the perch as many broods have in the past at age five weeks. They can be babies for a few more days, snuggled together for security.
When you feel the time is right for your chicks to start to roost, place them on the perch scrunched as close together as you can get them. That's the secret to teaching them to roost - giving them that close secure feeling they crave.