Animation works in studio, but errors in actual game play?

Basically, I have a rig that will play the other animation my friend made just fine, but will not play the animation I made ( In game), I get an error like

“Unable to load animation file”

What causes this? Does the animation need to be made in the game itself? Here is the code, even though its simple enough:

    	local m = script.Parent.Scene.Objects.Monster
		local a = m.Humanoid:LoadAnimation(m.Animations.BadWalk)
		a:Play()

I just have no idea why it works fine in studio tests, but in actual game play it breaks :confused:

3 Likes

Does it break every single time in game?

1 Like

Yea, the monster ends up just T-posing

1 Like

Maybe try m.Humanoid:LoadAnimation(m.Animations.BadWalk):Play()? Just a guess though

2 Likes

Ill test it when I get home, but it’s worth a shot lmao

1 Like

Right click the actual Animation instance, and Publish it to Roblox. Open the URL for the published asset in a browser, and copy the Id. Once you have the Id try loading the animation like so:

local Monster = script.Parent.Scene.Objects.Monster
local Animation = Instance.new("Animation")
Animation.AnimationId = 'rbxassetid://PUT_YOUR_ID_HERE'
local AnimationTrack = Monster.Humanoid:LoadAnimation(Animation)
 
AnimationTrack:Play()
1 Like

I think it’s still being reviewed? Animations cant be played until they’ve been “verified”, just like in the same way you cant see clothes that weren’t verified

2 Likes

I think i know what went wrong, I think I uploaded the animation to my profile instead of the group animations, do you think that would be an issue? (The game is in the group)

3 Likes

Thats actually what I was going to point out.

If you upload an animation to something thats not directly connected to the game then the animation will fail to load.

3 Likes

yes I think it was not on the profile or group that the game was created on I have had this issue in the past. You can’t use a friends animation etc… Has to be uploaded on same profile as the game

1 Like

Oh ok, thanks guys!! That helps lmao

2 Likes

I’m having the same problem. I’m still not understanding how this can be fixed. In studio, testing the game the animation works like a charm. But when I go into game with it, the animation doesn’t load and my avatar is all stiff. If it’s because my game is linked with a group, how do I fix it?

1 Like

I understand the problem now, but how do I achieve uploading the animation to the group? When I Exported the animation, it was obviously auto sent to the “Catalog” if that’s where I went wrong.

1 Like

You should be prompted with this when you upload the animation. From here, if you’re uploading it for a group place, upload it to “Group Animations”

Else, just upload it to “My Animations”.

Anything put in group can only be used by the group, and anything put in your animations can only be used by you.

2 Likes

Omg, I didn’t even notice that was a thing! Thanks, helps a lot.

2 Likes