Animation Speed doesn't change with controller sensitivity

I’d like to apologize in advance for any confusion I may cause since I’m not very familiar with working with animations on Roblox. Anyway, if the title of this post doesn’t already ask the issue I’ve noticed that when I set the default walking animation for the player, any input device that has any form of “sensitivity” such as a controller and it’s triggers or joysticks, won’t slow down the animation relative to to the decrease in the player’s walk speed.

Here is a video to hopefully show my point: https://youtu.be/fA6cQJ8IKcQ

2 Likes

Are you changing the walking animation in the default Roblox Animate script or do you have something custom? I believe Animate script adjusts animation speed based on movement speed. As an example if the animation is made for speed 16 then you can do following:

animationTrack:AdjustSpeed(moveSpeed / 16)

Hope this helps :smiley:

2 Likes

Move speed as in the magnitude of their Linear Velocity?

Either that or (Humanoid.MoveDirection.Magnitude * Humanoid.WalkSpeed) / 16

Roblox doesn’t have a way of regulating animation speed based on this by default? Because I do know default Roblox animations do not have this problem.

Yes, if you just swap the animation you use in the Roblox’s own animate script, it should do this logic for you

I try setting it via a script. Is this an issue then?

Can you show me how you’ve setup the scripts?

local WalkAnimationConversions = {
	[Enum.HumanoidRigType.R6] = {Walk = "rbxassetid://17097949283", Run = "rbxassetid://17097949283"},
	[Enum.HumanoidRigType.R15] = {Walk = "rbxassetid://15687243004", Run = "rbxassetid://913376220"},
}
local ConvertedAnimations = WalkAnimationConversions[Character.Humanoid.RigType]
Character.Animate.walk.WalkAnim.AnimationId = ConvertedAnimations.Walk
Character.Animate.run.RunAnim.AnimationId = ConvertedAnimations.Run

This is how I go about setting it.

Alrighty, I went to read through the roblox’s code and for R15 animate script that should work fine but for some reason on the R6 Animate script, roblox has added logic so it will only work for a specific animationId

function onRunning(speed)
	speed /= getRigScale()
	
	if speed > 0.01 then
		playAnimation("walk", 0.1, Humanoid)
		if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
			setAnimationSpeed(speed / 14.5)
		end
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.1, Humanoid)
			pose = "Standing"
		end
	end
end

You could try fully replacing the R6 animate script with a modified version to remove that check to make it work.

so i can just delete the animation check from that if statement

Yea you can just delete that so it doesn’t check for AnimationId and then for R6 users, replace their Animate script with your version

thank you man! I could’ve probably found this but I never bothered to look. I appreciate it.

1 Like