[NOT SOLVED YET]Why isn't my custom animation playing when humanoid has higher walkspeed than 15?
Asked by
8 years ago Edited 8 years ago
Why isn't my custom animation playing when humanoid has higher walkspeed than 15?
So.. I created a custom character, and that is working perfectly. BUT: I managed to add a custom walking animation, then I tried adding a custom running animation that should play whenver the humanoid has a higher walkspedd than 15. I updated the animation inside "run" in the player, and changed the "run" rbxasset inside the Animate script. However, when I with my running script run, it just plays the walking animation at a faster speed.
That is when I added this to the Animate script, on the onRunning section of it to be exact.
01 | function onRunning(speed) |
04 | playAnimation( "walk" , 0.1 , Humanoid) |
05 | setAnimationSpeed(speed / scale) |
07 | elseif speed > 15 then |
09 | playAnimation( "run" , 0.1 ,Humanoid) |
10 | setAnimationSpeed(speed / scale) |
13 | if emoteNames [ currentAnim ] = = nil then |
14 | playAnimation( "idle" , 0.1 , Humanoid) |
I know that I am probably doing something insanely wrong, but I can not seem to figure out what I am doing wrong.
I have searched on the Roblox Wiki without any luck at all.
How would I play my running animation while the humanoid speed is higher than 15?
By the way: I have set the default walking speed of the humanoid to lower than 15, and my running script changes it to 16.
Any help is greatly appreciated!