Walking?

How do I make an scripted animation :frowning:

When I ask for that I just want to know how you can make a persons feet move when you HOLD down Left and Right.

Example, I have an animation thats 6 frames long, and its through 1-6 and I am using the same animation (1-6) for walking backward and forward.

When i press Left Or Right, I want it to play to 6, and if I am still pressing left or right, I want it to go back and play from 1.

THIS IS JUST AN EXAMPLE :P, Please if u know other ways tell me :P!

Thank you :D!