Why is my idle animation not working?

My idle animation is not working.

It says: Animte is not a valid member of Model “Workspace.SilentSuprion”

Script:

local Player = game.Players.LocalPlayer

local Character = Player.Character

Character.Animte.idle.Animation1.AnimationId = "rbxassetid://AnimationIdHere"

Please help, and have a great day.

I’m not a programmer, but I have something that works.
Put the Animation in the script. Like as a child of the script. Put in the AnimationId the animation you are looking for.

Script:
local animation = script:WaitForChild(‘Animation’)

local humanoid = script.Parent:WaitForChild(‘Humanoid’)

local dance = humanoid:LoadAnimation(animation)

dance:Play()

Screen Shot 2021-05-27 at 6.19.34 PM

This would replace the idle animation? Also where do I put this, currently I have in starter character scripts.

Put the script in workspace.
The AnimationId is the id of the idle animation. Also, is your game a group game or a game made by you?

Humanoid:LoadAnimation() is deprecated. You should refrain from using this method.

This is a game I’m help making for my friend.

Apologies, I have no idea what this means, I specialize in building.
However, is there another way to load it in without using that?

I see. Do you own the animation?
That could result in failure to load animations.

Firstly, you probably mistyped the name of the instance so it couldn’t get it. Check it.

Secondly, it may not have found -if the first condition was invalid- the instance if it wasn’t created when the script runs. So using WaitForChild would be better.

Character:WaitForChild("Animate").idle.Animation1.AnimationId = "rbxassetid://AnimationIdHere"

No it’s made under the group. I’m not the animator lol.

Player.Character.Humanoid:WaitForChild(“Animator”):LoadAnimation(AnimationObject)

Try making a copy of the animation you are looking for. Then load the ID

1 Like

Still says:
Animte is not a valid member of Model "Workspace.SilentSuprion

Where do I add the assetid???

Are you sure this is the name of the animation? Maybe you forgot to add the “a” vowel?

And also, it shouldn’t print like that if you use WaitForChild since it yields until the instance is found. It should have printed something like “infinite yield”.

I’m still in confusion :confused:

AnimationId. In properties of Animation.

1 Like

In workspace, you will find the player than inside with be “Animate” where all the animations are stored and you can copy it.

1 Like

It says:
Workspace.Script:4: attempt to index nil with 'WaitForChild

You have to own the animation. Make a copy of it