I went through the same problem. For 3 weeks i had to put them in every night and close the door. By the end of the first week, they would stay in the coop without closing the door. They just wouldn't go in on their own. End of week two, some (like 2-3) would come to the door if I called them while standing at the top of the ramp and go in. Now, the end of week 3. I call them over and all but one of the 13 went into the coop last night. The light is KEY.
Last night we had friends over and we used the dining room. The light is never on in that room, but last night, obviously, it was. The light went through a door next to the run. WOW! They kept trying to jump in through the door window. (did I mention it was dusk...) Others would jump on my mini table next to the coop where the beams of light showed up on the coop wall and would try to push into the coop where the light was. Hello?!?! Funny at the time... So dining room light went off and I turned on the coop light. Magic! 12 of 13 chicks went in on their own. And pretty much in single file................Finally. It can be frustrating.