Changed Default Idle Animation Only Plays When the Player Moves

Im making an animation to be played as the default idle animation when the player is holding a sword, however the changed default idle animation i have set, only starts playing when the player starts moving.

Questions:

- How could i change the default idle animation and in the same time play the new animation?

  • The Script i made to make the animation id’s changes:
Character:WaitForChild("Animate").idle.Animation1.AnimationId = 'rbxassetid://9940581300'
Character:WaitForChild("Animate").idle.Animation2.AnimationId = 'rbxassetid://9940581300'

image
Had similar issue in a game I’m developing. Here’s how I fixed it according to another post. Change the player’s State, change the animations, I added “wait(0)” after, then change the players state back to what ever it was. Should fix it.

Still not working, i’ve noticed that the HumanoidStateType of the Player isn’t changing even if i change it on my code:

May I see you script you used to change the animations then?

sure

Humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
Character:WaitForChild("Animate").idle.Animation1.AnimationId = 'rbxassetid://9940581300'
Character:WaitForChild("Animate").idle.Animation2.AnimationId = 'rbxassetid://9940581300'
wait(0)
Humanoid:ChangeState(Enum.HumanoidStateType.Running)

anyway this same script was in the video

Is this a server script? If so, use a local instead?

Yes it is, however local scripts cant affect other clients, then, other players wouldnt see the new animation

Animations replicate to other clients, don’t forget that a client has network ownership over their own character models.

I had this issue a few days ago, and it changed the animation but for some reason at the server side the player arms would be lowered. You can check my Topic and see the solution that another programmer had helped me.

My current problem isn’t with the final result of the animation, its a problem that happens when you change the default idle animation, it just dont starts playing when changed and i cant play it manually, take a look at the videos i have sent.

So where does this apply in this case

Look at my code there it should be showing how u do it. At the part _G.ContextAS

well, i’ve seen it, however i was already thinking about playing all animations mannualy, but changing the default animations would be a lot easier for The Game Scalability, and i’ve already tried the change HumanoidState method

have you tried HumanoidState Landed?

yep

That means that you can change the animation’s IDs locally.