Animation Speed Error (Walk speed Interference)

Hello guys, thanks for clicking this post.

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)

1 Like

thats a natural bug i think. to solve it just make your own animation

edit(“nevermind i saw you did it”)

1 Like

yeah the thing is my animation is speeding up because of walk speed, but I want animation speed to be normal

1 Like

well can you showcase the animation

1 Like

it should look like this:

1 Like
speedAnim:AdjustSpeed(0.1) -- instead of 1 set it 0.1

Since your walking speed is very high, you can use a lower animation speed.

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.
image
It should work just fine then.

2 Likes

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?

1 Like


Just try copy and pasting the animate script and replace the run asset ID with your animation ID.

1 Like

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

Hi, I actually tried tweaking with this line a bunch. Do you think I have to completely delete it or just remove the variables and override it myself?

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.

1 Like

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.