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()
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.
WorldRoot (workspace) and a WorldModel are two different things, I suggested to Instance a WorldModel inside the viewmodel and try playing the animation.