Why is my animation not loading?

For some reason, my character isn’t really loading animations. It only loaded my jump animation, does anyone know why?

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local idleAnim = Instance.new("Animation")
idleAnim.AnimationId = "rbxassetid://7208722455"
local idleAnimTrack = humanoid.Animator:LoadAnimation(idleAnim)

local runAnim = Instance.new("Animation")
runAnim.AnimationId = "rbxassetid://8562381041"
local runAnimTrack = humanoid.Animator:LoadAnimation(runAnim)

local jumpAnim = Instance.new("Animation")
jumpAnim.AnimationId = "rbxassetid://8547783411"
local jumpAnimTrack = humanoid.Animator:LoadAnimation(jumpAnim)

local JumpSound = Instance.new("Sound")
JumpSound.SoundId = "rbxassetid://8396408200"
JumpSound.Volume = 2.7
JumpSound.Parent = humanoid.Parent:WaitForChild("Torso")


idleAnimTrack:Play()

humanoid.Running:Connect(function(speed)
	if humanoid.Jumping == false then
		if speed > 0 then
			runAnimTrack:Play()
			idleAnimTrack:Stop()
		else
			runAnimTrack:Stop()		
			idleAnimTrack:Play()
		end
	end
end)

humanoid.Jumping:Connect(function(joe)
	jumpAnimTrack:Play()
	
	if joe then JumpSound:Play() end
end)
1 Like

Is there any error, if not I would try this:

wait(3)

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local idleAnim = Instance.new("Animation")
idleAnim.AnimationId = "rbxassetid://7208722455"
local idleAnimTrack = humanoid.Animator:LoadAnimation(idleAnim)

local runAnim = Instance.new("Animation")
runAnim.AnimationId = "rbxassetid://8562381041"
local runAnimTrack = humanoid.Animator:LoadAnimation(runAnim)

local jumpAnim = Instance.new("Animation")
jumpAnim.AnimationId = "rbxassetid://8547783411"
local jumpAnimTrack = humanoid.Animator:LoadAnimation(jumpAnim)

local JumpSound = Instance.new("Sound")
JumpSound.SoundId = "rbxassetid://8396408200"
JumpSound.Volume = 2.7
JumpSound.Parent = humanoid.Parent:WaitForChild("Torso")


idleAnimTrack:Play()

humanoid.Running:Connect(function(speed)
	if humanoid.Jumping == false then
		if speed > 0 then
			runAnimTrack:Play()
			idleAnimTrack:Stop()
		else
			runAnimTrack:Stop()		
			idleAnimTrack:Play()
		end
	end
end)

humanoid.Jumping:Connect(function(joe)
	jumpAnimTrack:Play()
	
	if joe then JumpSound:Play() end
end)

You need to do LoadAnimation() on the humanoid:

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local idleAnim = Instance.new("Animation")
idleAnim.AnimationId = "rbxassetid://7208722455"
local idleAnimTrack = humanoid:LoadAnimation(idleAnim)

local runAnim = Instance.new("Animation")
runAnim.AnimationId = "rbxassetid://8562381041"
local runAnimTrack = humanoid:LoadAnimation(runAnim)

local jumpAnim = Instance.new("Animation")
jumpAnim.AnimationId = "rbxassetid://8547783411"
local jumpAnimTrack = humanoid:LoadAnimation(jumpAnim)

local JumpSound = Instance.new("Sound")
JumpSound.SoundId = "rbxassetid://8396408200"
JumpSound.Volume = 2.7
JumpSound.Parent = humanoid.Parent:WaitForChild("Torso")


idleAnimTrack:Play()

humanoid.Running:Connect(function(speed)
	if humanoid.Jumping == false then
		if speed > 0 then
			runAnimTrack:Play()
			idleAnimTrack:Stop()
		else
			runAnimTrack:Stop()		
			idleAnimTrack:Play()
		end
	end
end)

humanoid.Jumping:Connect(function(joe)
	jumpAnimTrack:Play()
	
	if joe then JumpSound:Play() end
end)

What do you mean? I’ve been doing this clearly in the script?

1 Like

No their wasn’t I will try it though.

Did you try in the ROBLOX client?

Is this a group game or not?

you where doing this:

humanoid.Animator:LoadAnimation(idleAnim)

not this:

humanoid:LoadAnimation(idleAnim)

Just try the script I gave:

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local idleAnim = Instance.new("Animation")
idleAnim.AnimationId = "rbxassetid://7208722455"
local idleAnimTrack = humanoid:LoadAnimation(idleAnim)

local runAnim = Instance.new("Animation")
runAnim.AnimationId = "rbxassetid://8562381041"
local runAnimTrack = humanoid:LoadAnimation(runAnim)

local jumpAnim = Instance.new("Animation")
jumpAnim.AnimationId = "rbxassetid://8547783411"
local jumpAnimTrack = humanoid:LoadAnimation(jumpAnim)

local JumpSound = Instance.new("Sound")
JumpSound.SoundId = "rbxassetid://8396408200"
JumpSound.Volume = 2.7
JumpSound.Parent = humanoid.Parent:WaitForChild("Torso")


idleAnimTrack:Play()

humanoid.Running:Connect(function(speed)
	if humanoid.Jumping == false then
		if speed > 0 then
			runAnimTrack:Play()
			idleAnimTrack:Stop()
		else
			runAnimTrack:Stop()		
			idleAnimTrack:Play()
		end
	end
end)

humanoid.Jumping:Connect(function(joe)
	jumpAnimTrack:Play()
	
	if joe then JumpSound:Play() end
end)

Its a group game but, why does this matter?

Is the animation uploaded to the group or your own profile?

Because if you didn’t publish the animation in the group, it wont load

only the run animation ( one thing that doesn’t work ) wasn’t uploaded on my profile, but the idle animation is on the group and also doesn’t work.

it did load, I used the id for the running animation and it worked, and the idle animation which is on the group also works so??

Is the idle animation uploaded as “Idle” in the animation editor?

Then upload the run animation to the group.

It will load in ROBLOX studio but not in the actual ROBLOX client.

1 Like

no, its OofyAnimations/idle


I meant this, sorry for late reply.

yes Its uploaded as idle, but the running animation is movement, is that an issue?

Try setting the idle and running animation as Core, well that’s what i usually do


All full body character animation like run walk or idle etc are on core priority
which is the lowest

so its fine to use movement and idle its higher than core priority