Help with animations in Viewport Frame?

Hello, I’m currently trying to develop a plugin in which I want users to be able to view emotes within ViewportFrame on their own character. However, I have been unable to load the emotes as shown below:

While trying to diagnose the issue, I have found that the code is loading the animation object and parenting it to the Humanoid as intended; however, no matter if I use the :LoadAnimation() function of the Humanoid or the Animator within the humanoid, it doesn’t seem to work.

I’ve looked at previous posts on the same or similar issues and I have added the character to a WorldModel; however, the issue still persists.

Here is the code if you need it:

local AnimLoad = InsertService:LoadAsset(AssetId) -- Loads the animation
local Anim = AnimLoad:GetChildren()[1] -- Extracts the Animation from the Model
Anim.Parent = Humanoid -- Adds it to the character

local Animator = Humanoid.Animator -- The Animator in the humanoid
local AnimLoad = Animator:LoadAnimation(Anim) -- Loads the animation
AnimLoad.Looped = true -- Sets it to loop
AnimLoad:Play() -- Plays the animation

If you have any ideas on how to fix this or what I may be doing wrong, please let me know.

Thanks for reading!
Have a good day :slight_smile:

try loading it into the humanoid

Thanks for the suggestion! I tried it but unfortunately it didn’t seem to solve the problem.

Thanks anyway though :slight_smile:

have u tried placing the character inside of a WorldModel and then loading the animations onto its animator while it’s inside of it?

Yeah that’s the way I currently have it set up. Thanks for the suggestion though!

I was able to find a solution! I found that writing code to individually animate each joint using the poses of the animation applied to the Motor6D joints of the character and using a Tween to transition between them seemlessly.

Thanks to those who helped!
Hopefully this helps someone else if they every come accross it :slight_smile: