Animation.Looped = true doesn't work

What do you want to achieve? I want to ensure that the animation remains looped after the bat is drawn.

What is the issue? When I draw the bat, the animation plays only once, even though it should be looped.

local animationTrack = self.Parent.Humanoid:LoadAnimation(createAnim(Bat.Main.Tools[self.Name].Animations.Idles[math.random(1, #Bat.Main.Tools[self.Name].Animations.Idles)].ID, "Equip"))
animationTrack.Priority = Enum.AnimationPriority.Action
animationTrack.Looped = true
animationTrack:Play()

Create Anim Function:

local function createAnim(id: string, name: string)
	local anim = Instance.new("Animation")
	anim.Name = name or "Unknown"
	anim.AnimationId = id
	
	return anim
end

Try setting Animation.Looped to true after playing the animation.
Also, for some reason, Animation.Looped doesn’t replicate to the server. I think it is best to set the looped property to true in your animation editor before uploading the animation.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.