Problem fixed [please close post]

I will explain what happened if you had the same problem:
Basically I was playing an animation on an NPC that my user created, but it failed to load when I played the game but worked in Studio. The problem was that it was a group game and group games can’t play animations that aren’t from the group. You must export the animation to the group to be able to make it play.
Thank you to runardie for figuring this out.

2 Likes

Edit: I changed the script to be this now:

local animation = script.Parent.Animation.AnimationId
local humanoid = workspace.GuitarGuy.Humanoid
local dance = humanoid:LoadAnimation(animation)

dance:Play()

It still doesn’t work and no longer works in Studio.

Try putting the local script in StarterGui
and edit the variables a bit

Greetings!
There might be a few issues, if you’re not paying attention.

  • When you created the animation, you forgot to enable Looped
  • Animation priority must be the biggest
  • Make sure the NPC is not anchored
  • In case what i said above gave you no response, try to follow sheasu’s tutorial. I, honestly, use his script and everything works perfectly!

Since sadly i cannot find the video anymore, i will send you the file with the script and files inside it.
PlayAnimation.rbxm (1.7 KB)

All you have to do is post the animation you created, get the ID and replace the animation’s id you find inside the given script. Then you’re ready to go!
If there are still problems playing the animations, ping me.

2 Likes

Thanks for the response! I had enabled looped, so that can’t be it. The NPC is not anchored and I’ll try again with sheasu’s tutorial if I can’t figure it out but, what do you mean by animation priority must be biggest? It is core if that’s what you mean?

Thanks for the response! I’ll try that but what do you mean by edit the variables a bit? Could you explain a little further?

Yes, yes! Core priority. I just couldn’t remember. My bad! Im waiting for your response about the success or failure.

1 Like

Okay so someone else said to put the localscript in StarterGUI and Animation in workspace so I tried it and it now works in Studio again. I’m going to the game to see if it works there. Thanks again!

1 Like

No, it doesn’t work in-game but it works in studio. I might retry it, unless you have any other suggestions?

Also another note: I have done animations before where you clicked a button and it would play the animation. It worked perfectly there yesterday in Studio and Roblox so Idk what is going on here.

The script i gave you. Put it inside the NPC you want to animate. Get the animation’s id you just created by going to your inventory > animations and paste the ID in the animation player you see inside the script.

1 Like

Okay, the script you gave me works in Studio but I don’t think it works in game. I’m kinda confused. I’ll go in game and check the console there. If I can’t figure anything out and you have nothing to add then I’ll have another crack at it tomorrow.

1 Like

I reuploaded the animation to no avail. I might have to retry this tomorrow with a fresh head. I can’t express how thankful I am for all the help! :smile: Thanks again, if you figure something out or realise something please reply again, I’d love to hear any suggestions on what to do!

my edit variables I mean
Making the local animation variable to

local animation = game.Workspace.TheAnimationLocation
since you changed the local script parent

Ah okay. Do animations have a moderation system? Though I doubt it, this would be a reasonable explanation for the issue. It still doesn’t work in Roblox though.

No it does not have a moderation system

I notice that you are working in a group game I am guessing that probably a other player uploaded the animation
the owner of the game has to also own the animations or else it won’t play in Roblox Player

Thought so. I check the console in game and this is what I saw, I don’t know why it failed. Also I created the animation.

Alright so I took another go at it today and when I joined the game, nothing edited, I saw this


Could you help me in anyway as to why it failed?

Try using my pervious post.