Animation works in studio yet not in game?

I am currently confused on why my animation script works in studio yet not in game. I have tried anchoring and unanchoring my characters, restarting the servers and publishing my game a couple of times. Each time it does not work.
In studio:

In game:


This is the script I am using:

local hum = script.Parent:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
anim.Looped = true
anim:Play()

I made my animation in Moon Animator, which I looped when making. Apologies if this is an easy fix, I do not know much about programming.

9 Likes

Did you export your animations?

Yes, I did. I exported it and put the id into the animation holder.
image

Group animations? Or your own animations

Make sure you have the correct id

My own animations. It is in a group game though.

Export it as a group animation then try again

2 Likes

Still does not work. (30 chars)

Moon Animator u animates it but where did u export it

I exported it from Moon Animator… Where else would I?
image

Export it from the default roblox animator

Make sure that all chars are r6 or r15

Export it as a group animation

Still does not work. Strange…

What character type are those models are r6 or r15?

They are all R6. I animated in R6 too.

Is your character type r15?? If so change it in the setting avatar>character type to r6

Still does not work. I also do not see how this relates to this, as we are not talking about your own avatar being animated.

If it works in studio then make a server with 2 players then see what the server sees

I would try using this script.

Double check and make sure that you are uploading the animations to your group, because if it’s uploaded to your own profile it will not show in game.

Also make sure all rigs have a humanoid, and that nothing is anchored. This goes for hats/hairs too.

15 Likes

Did not work, we surely would not have to use any other scripts for Roblox Animation. Does the group owner have to upload the animations to the group or can it be anyone? We’re having a few issues and your solutions did not work. If we un anchor my rig then it will just fall to the ground (as it’s coming down from the ceiling, for the scare maze) Like others has said, it works in studio but it doesn’t work in the main game.

1 Like

For the animation to be ran in game, the model will need to have a script for it to run.

As long as it’s uploaded under the group, the animations will be visible.

The animation will not play unless all parts are unanchored.

This is from my experience and learning, but as far as I know, everything would have to be unanchored. Otherwise, there will be no animation playing.

Hm, this is odd. If the animations work in studio while anchored but not in game, surely that’s a roblox issue. The game and animation was uploaded to my group yet it still doesn’t play on the main game.

It’s just odd that anchoring is affecting the in-game animations (for the main game not studio testing)

1 Like