How would i make a Script that if Player doesnt move play (insert) animation

So right now i have a problem that if my Sprint Script is used

It sometimes bugs and plays my Double W Animation (Sprint)

I cant seem to fix it since i have barely any Information on that,
As a Solution i thought that the following idea would fix that.

If a Player doesnt move for lets say 0.5 Seconds then play IdleAnim.
However i dont know how i would make such a script.
Thats why i came here for help (:

Appreciate any kind of help !
best regards AurumWrl

1 Like
  if humanoid.Magnitude <= 0 then
    --play animation

Thanks for the help ill try it out in a minute :smiley:

Alright so humanoid is unknown and i cant get playAnimation() into --play animation :confused: any ideas?

look into this instance called an animator object and play it client side

1 Like