Trying to get my idle animation to play after my attack anim is done outside of this remote event

currently im just stopping the idle, playing the attack then going back to idle, but the way i have it set up its trying to go idle when the attacking event fires. how could i add this so its going to play idle only after the attack has played?


animateTower.OnClientEvent:Connect(function(tower,animationName,target)
	if target then
		stopAnimation(tower,"Idle") -- this stops the idle anim
		
		playAnimation(tower,animationName) -- this line plays the attack anim
		
		-- want idle to play after the line above is done ( cant do anim.stopped cause i want the idle to play outside of this remoteevent )
		if tower.Config:FindFirstChild("Projectile") then
			Projectile(tower,target)
		end
		
		if tower.HumanoidRootPart:FindFirstChild("Attack") then
			tower.HumanoidRootPart.Attack:Play()
		end

	end
end)