Animating pets only when the player moves?

In a lot of simulator games the pets only play a animation when the player is moving, how do they do this?

1 Like

It follows the player when it moves. I think. Need a script for that?

1 Like

No i just want to know how they know when to play the pet animation

What do you mean by “animation”. When I played pet simulator games, they only had the pet being dragged with the player in a idle position. I don’t really play simulators, but when I did, that’s what happened with the pets.

When the pet is not in the position it should be it plays a bouncing animation

1 Like

Move around with a pet and you will see what i mean

Get the current state of the humanoid, if the state is walking, play the pet animation.

3 Likes

Okay that makes sense thank you

1 Like

In my experience, Humanoid states are a pain to deal with. I suggest you instead check if the Humanoid.MoveDirection.Magnitude > 0. Works across all platforms, too. Not that Humanoid states don’t, just pointing it out.

3 Likes