Help with Animation Script

I am working on a script for a katana testing, I have scripted the idle animations and attack animations, but I don’t know what to put for the walking animation lines.

gah

I am trying to make it so that if it detects movement, the animation walking will play and the idle stops, and if movement is stopped idle is played and walking is stopped. What do I use? Thanks

You can listen for movement keys being pressed such as W, A, S or D. When they’re pressed you can play the animation until they’re unpressed.

There will need to be a lot of thought put into making it robust, and you may want to look for alternative solutions if you wish to build your game on other platforms like console or mobile.

For more information see: UserInputService | Documentation - Roblox Creator Hub

Hope this helps,
-Tom :slight_smile: