Problem with Key Release

I have a walk animation but when you release the key, you return to the Idle animation.
I know you can put Key-released, and "player.gotoAndStop(“Idle”) But it interrupts other animations, such as just pressing E to play an animation, it causes you to go back to the Idle animation. I can’t find a way to explain it better.

Play it for yourself and Review the project
here!12-15-2024_19-09-35

try replacing that keyreleased script with this:

if(key === "w" || key === "a" || key === "s" || key === "d") {
    this.gotoAndStop(1);
}

from my understanding, this code will check if the key being released is any of WASD, and if so, it will go back to idle. if you press “e” or anything else, it will not force you back to idle.

1 Like

Thank you there! I dont know how I didnt think of that before