If you have a four bar measure, play through a complete four bars - and then press record with your foot on the 'one' of the beat as you continue playing the riff.
If you play nothing, do a count in, and TRY to press record and start playing with your fingers it will always sound like a stutter or glitch when it returns to the beginning of the phrase to loop again.
Think that when you are playing the following chords in the pattern A, B, C and D.....when you move from the D chord to the A chord again you need to hear that transition from D to A...there isn't a minute pause every time you repeat a section in real life...unless its for a musical purpose
Looping is a pain in the ass when you first start...but very rewarding after a little practice
Cheers,
Greg