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