Board Thread:M.U.G.E.N Help/@comment-10227639-20160117015425/@comment-28747875-20160117072752

AnimElem is an old style trigger, which means it can't be used to return the current animelem nor stuff like that. It is literally only to be used on conditional and boolean expressions. In other words, you can write things like Animelem=2, but you can't set var(9)=animelem nor any value like that.

what you're looking for is the trigger Animelemno(0), which does return the actual animation elem number on the current frame.