AnimationTrack.Length > 0 yielding forever

As i said this piece of code is yielding in the repeat loop.
When I try to print holdanim.Length it says attempt to index nil with Length

hold is variable with an Animation Object.
holdanim is just a empty variable declared further up.

This piece of code is in a Localscript within a Tool when the .Equipped event got fired (also this print statement prints “Hold” so it cant be the WaitForChild part):

	holdanim = hum:WaitForChild("Animator"):LoadAnimation(hold)
	print(holdanim)
	repeat
		wait()
	until  holdanim.Length > 0
2 Likes

Your loading the anim itself correct? not the object the anim is in

1 Like