Emote/Animation UI Preview - Catalog Avatar Creator Style

Hey! I want to replicate the UI preview of the selected emote, exactly as Catalog avatar creator did it. Image below shows what I want to replicate:

I’m thinking of it being a viewport frame with the player’s rig and loading the Id of the emote. However, that does not work due to it not being owned by me or my group. And it prints this error below:
image

This is the function I’ve made for this:

function PreviewModule.PlayEmotePreview(AssetId)
    if not Rig then
        PreviewModule.CreateAvatarRig()
    end

    if CurrentAnimTrack then
        CurrentAnimTrack:Stop()
        CurrentAnimTrack = nil
    end

    EmoteAnimation.AnimationId = "rbxassetid://" .. AssetId
    local EmoteAnimationTrack: AnimationTrack = Animator:LoadAnimation(EmoteAnimation)
    EmoteAnimationTrack.Priority = Enum.AnimationPriority.Action
    EmoteAnimationTrack.Looped = true

    EmoteAnimationTrack:Play()
    CurrentAnimTrack = EmoteAnimationTrack
end

I have a viewport frame, inside of it I’m creating the player’s avatar using CreateHumanoidModelFromDescription, and have a camera inside it. That’s the rig variable.

So, my question is, how did they bypass this, or what method could they use?
Thanks for any help!

1 Like