Animations not showing on a custom character for others

I need to make it, so the animations show for other players, and not only for me. They can move around and such, but they won’t work for others. Keep in mind this is a custom character, following a tutorial from GnomeCode. I’ve been researching so much, and none of it fixes it.

It’s not a group game and only I own it.

local character = script.Parent
local animator = Instance.new("Animator")
local humanoid = character:WaitForChild("Humanoid")
animator.Parent = humanoid
local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid:LoadAnimation(walkAnim)
local animateScript = character:WaitForChild("Animate")

humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimTrack.IsPlaying then
			walkAnimTrack:Play()
		end
	else
		if walkAnimTrack.IsPlaying then
			walkAnimTrack:Stop()
		end
	end
end)

--this was all made by GnomeCode

I’m a beginner at animating, so please just bear with me here and explain the problem thoroughly.

change this

local walkAnimTrack = humanoid:LoadAnimation(walkAnim)

to this

local walkAnimTrack = animator:LoadAnimation(walkAnim)
1 Like

Also do not create the animator inside of the local script, put it inside of the humanoid in studio.

Would this be it?

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid.Animator
local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = animator:LoadAnimation(walkAnim)
local animateScript = character:WaitForChild("Animate")

I’ve done this before and it still wouldn’t work.

Yes that should make it work, make sure you put animator in :WaitForChild() though, and that you have an Animator inside of Humanoid

So, when you say this (I got a bit confused), do I add :WaitForChild() to the humanoid.Animator? Or do I add a completely different thing? (I added WaitForChild to it, and it did not play the animation.)

to the humanoid.Animator, if it still didn’t work show me what the inside of your humanoid looks like.

image
That’s all.

This may sound like a dumb question but does the animation work for you outside of Roblox Studio? (inside the actual game)

Yes, it does. Why? Do you think that’s the problem?

I was thinking about something else but since you said it does it isn’t it.

As @Encaptor stated, you should use humanoid.Animator:LoadAnimation() when you want animations to replicate to the server.

Do not create an animator under the humanoid, the game automatically creates an animator for you; placing an extra one could lead to weird behavior.

If the game is still failing to find an animator place it inside a wait like so: local animator = humanoid:WaitForChild("Animator")

Here is the information that verifies it:

You should mark @Encaptor 's answer as the solution if it ends up working.

Hope this helps with your issues! :smile:

Wait what do you mean by “They can move around and such, but they won’t work for others”?

They can move the character physically, but the animations don’t play.

Are there any errors inside the console when you press F9? (inside of the actual game)

No, there are no errors with it. The only errors I have is unfinished scripts I’m working on.

Then I’m genuinely at a loss, I don’t know what other problems there could be

Having an extra animator most likely won’t produce any console errors. I’m talking about silent problems that cause unwanted behavior.

Okay, so I’ve done this (removed animator, added a local animator)

It doesn’t work when I play on my alt, as they still don’t have any animations.

When you load into a blank baseplate the game creates an animator for you; you just have to reference it in your scripts:

Screenshot during playtest

image


However, if you are using a StarterCharacter under StarterPlayer you WILL have to place your own Animator under Humanoid:

Screenshot in Studio

image

If that doesn’t help check this out: