Does the detent pin properly engage into the takedown pin slot? Make sure the pin is in the slot running the length of the takedown pin. If the pin is not going all the way through the hole, you may need to clean the hole out with a drill bit (by hand) There may be a burr in there stopping the pin. If the pin is engaging the takedown pin in the slot correctly things should be OK. Lube (I used a little tetra gun grease) up the takedown pin's slot and hole and make sure the pointy end of the detent pin is going INTO the takedown pin. The takedown pin should be hard to move, you should have to use a little leverage to move it. You wouldn't want the pin to disengage during firing. The spring will stick out of the back a little and the stock will compress the spring when you install the stock. Make sure you don't bend the spring and crimp it.
Also, remember, the takedown and pivot detent springs are the same springs. The safety selector detent pin and spring are different. Make sure you aren't using the wrong one. It helped me to lay out all the pins and springs exactly like the picture in the arfcom lower assembly guide. I made my coffee table look just like the picture so there was no question I grabbed the correct spring/pin.
That's my experience anyway, I just finished building my first AR, so that the above for what it's worth :)