Ordinarily I can get animations to work in viewports via WorldModels, however I am having trouble getting Mood / Face animations specifically to work. Below I’ve attached two images and some code — the first image is what the rig looks like in a viewport (it is animated with an idle animation, just to confirm that animations are showing), and the second image is what the code looks like if I run it specifically on the player’s character.
As you’ll see, mood animations work on the player, but not on the rig inside of the viewport.
The viewport rig is just a Player.Character:Clone()
situation, so I can confirm that the animation IDs and humanoid descriptions are equal. I’ve checked that thoroughly. The mood animation is from the Moods tutorial on the documentation.
local faceRig = faceButton.ViewportFrame.WorldModel.TemplateRig
local rigDescription = Instance.new("HumanoidDescription")
rigDescription.Head = 13692956122
rigDescription.IdleAnimation = 10725833199
-- some stuff about setting up the camera for the viewport... not important
faceRig.Humanoid:ApplyDescriptionReset(rigDescription)
I’ll again emphasize that the exact same code is being run on both the player and the viewport rig. I have even tried waiting 5 or so seconds to visibly watch the mood animation on the player model, then clone it and put it into the viewport, and while every other animation runs, the mood animation does not.
I believe the only fundamental difference is that one runs from a modulescript tied to a server script, while the other runs on a local script connected to the UI. But I don’t think that should matter.