Hello, I’ve been trying to make NPCs (R15) play a walking animation according to walking speed, so that
if I set the walking speed higher the NPC will not look like they are walking slowly.
I have very litte experience with animations
I already have the NPC and the animation, just need the animation to sync with the walking. Thank you in advance!
Just a possible idea
you could use some sort of RunService.Heartbeat connect function for something to run every frame and continuously check the walkspeed property of the Humanoid of every player, on the Client to remove unnecessary replication , and when the walkspeed value is lesser than a set value, such as 15, the animation that’s supposed to run at slower speeds plays.
Heartbeat because it fires every frame and depends on the performance of the local Client’s own machine.
Sorry, but that isn’t what I meant. I wanted to adjust a animations speed based on a humanoid.
All i know is that there is someway to adjust the speed of an animation, and was looking for a way to utilize that.
It’s ok though, I’ve found a way to do it.
P.S your code wouldn’t work if you declared speed before the loop, as that will only set the variable to the walkspeed the humanoid had when the script ran the first time. No offense, just wanted to point that out as it confused me at first aswell.
Yeah I accidentally put it before the loop,
If you declare a variable before you start reiteration , that stored value will be used not the constantly changing one