Run Animation Plays When The Player Should Be Walking?

I’m having an issue with some custom animations I’m trying to use; basically when the player is walking around the “Walking” animation should be playing but instead the “Running” animation does. All I’ve done is changed the ID’s in the default Roblox animation script, but I am using a custom walk speed so maybe that’s throwing it off? I’ve looked around in the Script (again just the default animation script) and it refers to the walking speed several times in regards shifting between the “Running” and “Walking” but I’m not sure if I need to change anything here.

Any help you can provide would be appreciated!

Again, all I have done is changed the default Walk Speed and Walking/Running animations:

image

local animNames = { 
	
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=8172614962", weight = 10 } 
			}, 
	run = 	{
				{ id = "http://www.roblox.com/asset/?id=8172614962", weight = 10 } 
			},
1 Like

The ID is the same:

{ id = "http://www.roblox.com/asset/?id=8172614962", weight = 10 } 
{ id = "http://www.roblox.com/asset/?id=8172614962", weight = 10 }

the same animation will play, walking and running

Realized I posted the wrong screenshots, I’m doing some testing to try and figure it out, these are the correct ones:

image

local animNames = { 

	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=8172614962", weight = 10 } 
			}, 
	run = 	{
				{ id = "http://www.roblox.com/asset/?id=8173381407", weight = 10 } 
			},

Edit: I set the walkspeed back to 16 to see if it would work then, but it appears that something else must be causing it because it’s still having the same issue.

game.Players.PlayerAdded:Connect(function(player) 

local Char = player.Character or player.CharacterAdded:Wait()


Char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://8172614962"
		
Char.Animate.run.RunAnim.AnimationId = "rbxassetid://8172614962"

I used my animations and it worked, when I tried yours the animation didn’t run, there’s something else causing it, but I don’t know what it is

this line of code just replaces the animation

1 Like

Yeah, something else has to be going on; I deleted the “Animate” script and replaced it with yours, I still have the same issue. The “Running” animation still plays instead of the “Walking” animation…

p.s. my animation’s won’t work for you because Roblox requires that the game’s creator to upload the animations onto their own profile.

Roblox animations work in a weird way. The run animation is the walking animation. The walk animation only plays when the walkspeed is below 9 or 8 I believe, which is extremely slow. I suggest using this script.

local Player = game.Players.LocalPlayer
	local Character = workspace:WaitForChild(Player.Name)
		local Humanoid = Character:WaitForChild('Humanoid')
		
local RunAnimation = Instance.new('Animation')
RunAnimation.AnimationId = 'rbxassetid://8042822386'
RAnimation = Humanoid:LoadAnimation(RunAnimation)

Running = false

function Handler(BindName, InputState)
	if InputState == Enum.UserInputState.Begin and BindName == 'RunBind' then
		Running = true
		Humanoid.WalkSpeed = 30
	elseif InputState == Enum.UserInputState.End and BindName == 'RunBind' then
		Running = false
		if RAnimation.IsPlaying then
			RAnimation:Stop()
		end
		Humanoid.WalkSpeed = 16
	end
end

Humanoid.Running:connect(function(Speed)
	if Speed >= 10 and Running and not RAnimation.IsPlaying then
		RAnimation:Play()
		Humanoid.WalkSpeed = 30
	elseif Speed >= 10 and not Running and RAnimation.IsPlaying then
		RAnimation:Stop()
		Humanoid.WalkSpeed = 16
	elseif Speed < 10 and RAnimation.IsPlaying then
		RAnimation:Stop()
		Humanoid.WalkSpeed = 16
	end
end)

Humanoid.Changed:connect(function()
	if Humanoid.Jump and RAnimation.IsPlaying then
		RAnimation:Stop()
	end
end)

game:GetService('ContextActionService'):BindAction('RunBind', Handler, true, Enum.KeyCode.LeftShift)

Make sure the animation priority is action or movement and the script is in StarterGui.

7 Likes