Multiple Animation Channels problem

I’m having an issue switching between animations. Currently I have a class that contains an animation control and a list of animation channels. I have one channel for each animation for the object. I’m trying to switch animations by stopping one channel and playing the next but only the first animation stops and the second one never plays.

 public void stop(String name,String animation){
        
        for (AnimationObject x : animationList) {
            if (x.name.equals(name)) {
                for (AnimChannel c : x.channels){
                    if (c.getAnimationName().equals(animation)){
                       c.setSpeed(0); 
                    }
                }
  
            }
        }
        
    }
    
    public void play(String name,String animation,Float speed){
        
        for (AnimationObject x : animationList) {
            if (x.name.equals(name)) {
                for (AnimChannel c : x.channels){
                    if (c.getAnimationName().equals(animation)){
                       c.setLoopMode(LoopMode.Loop);
                       c.setAnim(animation);
                       c.setSpeed(speed);
                    }
                }
  
            }
        }
        
    }
    
//code to stop and play
myWorld.animation.stop("jessica", "run");
myWorld.animation.play("jessica", "walk", 1f);

You’d use one AnimChannel and simply set the animation to be played on that.

Aye , I went back and set it too one animation channel per control. Either way I’m stuck with multiple controls and channels because they way make human sets up the model is one control for each part so body , hair , clothes , etc. have their own controls.

It worked fine using one channel. I’m still not sure why the multiple channels aren’t working but I guess it doesn’t matter if each part has it’s own control no need for multiple channels.