Function that fires when Player walks

Hey there!

So i need a script which will animate a monster rig when it walks. What is the most efficient way of doing that? I have the animation ID ready.

Any help is appreciated!

View the solution from this link: How can i detect if they player is walking and give him points for it every 0.5 seconds?
He said to check the moveto position of the humanoid, if its not 0,0,0 then they are walking.


You could have the animation play while the NPC is moving

If you need the animation to play just insert a script inside the NPC, have an animation inside it, and use something like this

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local Walk = humanoid:LoadAnimation(animation)

I’m not trying to animate an NPC. I’m trying to make it so whenever the player moves (with the monster skin on, which they will have if they are chosen as the monster), the walking animation plays. @XOLT1268 managed to find the answer.

I appreciated the help though!