Animation is playing, but not visible?

I am doing this in a ViewportFrame but I have also tried this in workspace and have gotten the same result. I also own the animation, it is looped, and it is the only animation playing on the object. Any ideas on why this is not working? This is also on the Client. When I print shackTrack.IsPlaying, it says true.

local egg: Model = EggData[eggName].character:Clone()
local animationController: AnimationController = Instance.new("AnimationController", egg)
local animator: Animator = Instance.new("Animator", animationController)
local shakeAnimation: Animation = Instance.new("Animation")
shakeAnimation.AnimationId = "rbxassetid://7780409781"	
ScreenUtil.insertToViewport(_G.hatchScreen.ViewportFrame, egg)

local shakeTrack: AnimationTrack = animator:LoadAnimation(shakeAnimation)
shakeTrack:Play()

Do you set the parent of the AnimationController, Animation and the Animator?

I do so during their instantiation

I see what the problem is. Try adding a WorldModel inside the viewport frame to give it some physics features

I’m not sure if it’s good to make a new animator each time! As soon as you call load animation on the humanoid/animation controller one will be created, so maybe try that instead, the replication with anims can be tricky.

I have tried this in workspace and it did not work. I do not think the viewport is the problem here.

WorldRoot (workspace) and a WorldModel are two different things, I suggested to Instance a WorldModel inside the viewmodel and try playing the animation.

I have not used WorldModels before. Do you have a code sample?

Just create a WorldModel and parent it to the Viewport

local worldModel = Instance.new("WorldModel")
worldModel.Parent = viewportFrame

When I do this in workspace, the animation does not play even though .IsPlaying says it is.image

If the egg is anchored, try unanchoring it and then playing the animation

image

Does the egg play the animation?

Try parenting the AnimationController inside the egg mesh

No. That’s been the problem. The animation does not play, but it says it is

If the animation doesn’t play after parenting the Animation Controller to the egg mesh, I would suggest looking into TweenService