Animations don't work in WorldModel of ViewportFrame

Hello, I’m having an issue with animations running in the WorldModel of a ViewportFrame under a screengui. I have a custom rigged model that displays the animation in the workspace using the same code successfully, yet any attempts at running under a gui has not worked. I’ve gone through numerous threads with similar issues though to no avail. Thanks in advance.

local animator = petModel:WaitForChild("AnimationController"):WaitForChild("Animator")

local animation = Instance.new("Animation")
animation.AnimationId = settings.PETS.PET_ANIMATION

local petAnimation = animator:LoadAnimation(animation)
petAnimation:Play()

Viewport hierarchy:
image

Checking to see if the animation is running has given no insight either as to what’s happening since both prints tell me that the animation is active.

print(animator:GetPlayingAnimationTracks())
print(petAnimation.IsPlaying)
1 Like