Need help with repeating a riff

Hello, I’m writing/recording a song using audacity, and I would like to repeat a riff several times, however, for some reason, I can’t get a smooth transition from riff to riff, there’s always either a jump or a slight delay

Thanks in advance!

Have a read of this Tutorial from the Audacity Manual on Looping:

In the next release of Audacity due out quite soon there are some big improvements to the Timeline functionality which should make the looping process a bit easier.