Animation not looping the first try but the second?

What do you want to achieve?
looping on the first go.

What is the issue?
it wont loop the first time but it will the 2nd time.

What solutions have you tried so far?
To try playing the animation twice, nothing happened.

overlordremote.OnServerEvent:Connect(function(plr, character)
	print("overlord")
	local hrp = character:FindFirstChild("HumanoidRootPart")
	local animator = character:FindFirstChild("Humanoid"):FindFirstChild("Animator")
	local resistanim = animator:LoadAnimation(game.ReplicatedStorage.AbilityContent.Animations.ResistOverlord)
	local resistidleanim = animator:LoadAnimation(game.ReplicatedStorage.AbilityContent.Animations.ResistIdleAnim)
	resistidleanim.Looped = true
	local newmusic = game.ReplicatedStorage.AbilityContent.Sounds.OverlordMusic:Clone()
	newmusic.Parent = hrp
	newmusic:Play()
	resistanim:Play()
	wait(0.6)
	resistidleanim:Play()
end)

The resistidleanim is the one i want to loop.

I have no idea how to make it loop first try

wdym by wont loop first try? i dont get it

1 Like

Ok so what happens: I press E to activate the ability, then it loads all the animations and sets the Looped property on the 2nd animation, resistidleanim. it plays the first then plays the 2nd. The 2nd is suppose to loop but it dosen’t. The next time i press E to fire the ability, it then starts looping.

1 Like

can u show a quick video showing the looped anim?

1 Like

this is what it is doing

1 Like

so the 2nd one where u stay on the ground is what u want to achieve the first try?

1 Like

Yes thats what im trying to do

1 Like

try editing the animation in ur anim editor and set looped on over there and try?

1 Like