Looping a Rotation Interaction

I’ve tried this and it loops but it’s not smooth, there’s always a glitch. Any way to fix it?