Does the issue occur in the editor or during gameplay?
Gameplay
If it's a gameplay issue, please specify which movement system and camera type you're using (free movement vs. grid movement, third-person vs. first-person) or N/A if not applicable:
Free movement, third-person
Briefly describe the issue you're experiencing:
The walking animation keeps overwriting other animations even if it should have already stopped playing.
If you for example have a script that triggers upon the player walking on a tile or colliding with an object, if you lock player movement and play an animation, the walking animation overshadows the triggered animation and results in just 1 frame of the animation playing before returning to idle.
This even happens if you've added a stop player and/or stop walking animation beforehand.
One workaround is to add a wait() of at least around 0.05 (or more as even that is sometimes not enough)...
Are there any errors in the in-game debug console or external console window?
nope
Provide the steps necessary to reproduce the issue:
- Trigger a script while the player is walking
- lock player movement, stop the player and/or walking animation with the respective lines of code
- let the player play an animation right after that
- the player will now only play 1 frame of the intended animation before returning to idle due to the walking animation still running although it should be stopped
- add a wait(0.05) before the play_animation and it'll work (most of the time - if not, increase the wait)
Provide a download link to the bare bones project (if applicable):
/