How to change the speed when walking animation plays?

Greetings,
I am currently trying to change the speed at which the default walking animation plays. If you don’t know what I mean by this, when you press WASD on your keyboard your speed changes straight to the walking speed, on mobile/Xbox however, you can walk slower than the walk speed and when this is done a walking animation appears instead of the running one.

I am a very unskilled scripter and I have no idea how to start this, help would be greatly appreciated!

2 Likes

If you want to nerf everyone to a walking speed, you could edit the CharacterWalkSpeed property of StarterPlayer down a bit. If you’re talking about changing the speed where the animations fade between walking and running, you’d need to edit the weight and/or speed calculations in the Animate localscript that arrives on every character or create your own.

1 Like

To change the speed of an animation, there’s something called AdjustSpeed(). The default number is 1. If you wanna speed it up, increase the number.

animation:Play()
animation:AdjustSpeed(2) -- double speed
animation:AdjustSpeed(0.5) -- half speed
animation:AdjustSpeed(0) -- paused
6 Likes

That’s not what I’m trying to do, I’m trying to modify the animate script so that the walking animation plays when the players walkingspeed is higher than the default speed.

1 Like

I’m trying to do the second part, how would I edit the animate script tho?

1 Like

You can grab the animate script by testing your game, going into Workspace, finding your character model then copying the “Animate” localscript. Exit testing and paste it back in somewhere and you have a copy you can edit. It’s a little ugly to read though. *You’d need then to replace the stock Animate script with your own; you could hold it in server and on a .CharacterAdded event kill the old one and swap yours in.

4 Likes

Ah, alright. I’ll just delete the existing one and put a modified version into it’s place. Thank you for answering my question!

1 Like