Just a question i have a character with walking and attacking animation but now i only added moving script to him so now can i those walking and attacking animation when he is close to player or add it after i learn more scripting and also while moving forward my enemy began to fall down and moving in sleeping posistion , why it happens?
I would suggest you look at Mecanim and how to make character controller. With "root motion" you can use the animation to drive the movement of the character.