Im working on a little speedster test for fun, and my speedster running animation is playing way too fast as I would like, and this is because I increased the walk speed from 16 to 1000, and running the animation when the speed is at 1000. For those who do not understand, here is what I mean
And here is the code:
local UserInputService = game:GetService("UserInputService")
local char = script.Parent
local human = char.Humanoid
local Animator = human:WaitForChild("Animator")
local speedAnim = Animator:LoadAnimation(script.Animation)
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftShift and not gameProcessedEvent then
human.WalkSpeed = 1000
speedAnim.Looped = true
speedAnim:Play()
speedAnim:AdjustSpeed(1)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftShift then
human.WalkSpeed = 16
speedAnim:Stop()
end
end)
Note: I have already tried changing AdjustSpeed AND changing the characters animation script, so please try giving me a better solution (but if changing Animate script is the solution, I will accept it)
yeah I tried that, it didn’t work. I feel like the walk speed animation may be overriding my own animation, do you think changing the priority of the animation is a good solution?
I think I know the reason, but just to be sure, are you using any alternate running animation script or are you using the default “Animate” script Roblox provides you with?
If you are, go to line 591 in the animate script and delete this line of code.
well, I actually tried using a custom Animate script before but it didn’t work as I expected, but should I make a duplicate in replicated storage and specifically edit this line of code?
For some reason, the walk animation was not replaced. I tried your first method and it heavily deformed the animation a lot, although it might be the best solution i have received for now
This line handles the animation speed scaling with the walk speed. If you don’t want your run animation to be super fast since your walk speed is super fast, then you would need to completely remove this line.
Thanks! I can see the interference that line of code is causing now, but personally for me, I just reduced the animation speed greatly just incase I may want to play around with it more, but I understand how it is messing with my animation.