Animations Not Working

My custom R6 Walk animations are not working, No matter what I do they will not budge. I am making a zombie walk animation but for some reason, the script works perfectly fine, yet the rig won’t move a bone. No errors, no anything. Can anyone please suggest why or how this isn’t working? Any help is appreciated.

– SCRIPT (Local script on StarterPlayerScripts) –
local Mobs = workspace:WaitForChild(“Mobs”)

local function OnChildAdded(object)
if object:IsA(“Model”) then
local AnimationController = object:WaitForChild(“AnimationController”)
local Animator = AnimationController:WaitForChild(“Animator”)
local Animations = object:WaitForChild(“Animations”)

	if AnimationController and Animator and Animations then
		local walkAnimation = Animations:WaitForChild("Walk")
		local walkAnimationTrack = Animator:LoadAnimation(walkAnimation)
		walkAnimationTrack:Play()
		print(walkAnimationTrack.IsPlaying)
	else
		warn("Couldn't load")
	end
end

end

Mobs.ChildAdded:Connect(OnChildAdded)

– OUTPUT –

16:15:18.059 true (x10) - Client - Animations:13

Being a simple oversight or an engine bug or anything, I would, again, appreciate any improvements, tips or explanations as to why the rigs are static, lifeless, as motion like a rock.

2 Likes

local Mobs = workspace:WaitForChild(“Mobs”)

local function OnChildAdded(object)
if object:IsA(“Model”) then
local AnimationController = object:WaitForChild(“AnimationController”)
local Animator = AnimationController:WaitForChild(“Animator”)
local Animations = object:WaitForChild(“Animations”)

	if AnimationController and Animator and Animations then
		local walkAnimation = Animations:WaitForChild("Walk")
		local walkAnimationTrack = Animator:LoadAnimation(walkAnimation)
		walkAnimationTrack:Play()
		print(walkAnimationTrack.IsPlaying)
	else
		warn("Couldn't load")
	end
end

end

Mobs.ChildAdded:Connect(OnChildAdded)

2 Likes

You should try running the animations on a serverscript

2 Likes

Put this script into a server script either parented to workspace or serverscriptservice. I don’t think ur script should be running on a local script

2 Likes

In my experience this is happening for possibly one or two reasons

  1. As others have said, you should be using a server script, or else the animations wont run on the server.

  2. I dont know if your defining the animation correctly? (I could be wrong), but im pretty sure it should be something using the humanoids animator, then loading it that way.

Animation docs

2 Likes

Alright guys. I’m very sorry. Terribly sorry. I had anchored all the parts. Such a simple oversight, I am ashamed of myself. Hopefully this short thread serves as a warning or an option of solution to those who get struck by the same problem in the foreseeable future.

1 Like

Thanks for do trying to help, I don’t really run animations on servers since it is inefficient.

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