Transitioning to sleeping in pack n play

My daughter is 5 1/2 months and I’m trying to get her moved to sleeping in her pack n play. Right now she sleeps in her swing. Any advice! It’s not going well, she just won’t fall asleep in it. If I put her in it drowsy she immediately wakes up crying, if she’s completely asleep she wakes up soon after. Also trying to get her to nap in it, right now she’ll only nap on me.