Custom entity- how to play a continuously looped animation?

How would I set an entity to play a LOOPED sequence? I’ve made a custom model to use as an entity, which works fine, but the sequence will not loop, even though I have

$sequence spin "anims/spin.smd" {
	loop fps 3.0 //Should work

In the QC. In the Lua, I have

	local sequence = self:LookupSequence( "spin" )
	self:SetSequence( sequence )
	self:SetPlaybackRate( 1.0 )
	self.AutomaticFrameAdvance = true

but the sequence stops after playing only one time. What am I meant to do to get a continuously looping sequence?
By the way, it’s my first time even attempting to do any sort of movement, so I’m sure if the code isn’t the problem, it’ll be the sequence itself.
It seems to loop okay in HLMV.

I’m not sure it will make much difference, but I have had better luck with ENT:ResetSequence with animation related things.

Yep, ENT:ResetSequence works, but now it stops for a brief moment before re-looping. Note I have

function ENT:Think()
	 self:NextThink( CurTime() )
	 return true

Also in the script, because apparently it stops choppy animations. I have a feeling CurTime may not be the best way to do it, however. Maybe it lags, I don’t know.