PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

GetEmotes

GetEmotes returns a dictionary of emotes that have been HumanoidDescription/AddEmote|added or HumanoidDescription/SetEmotes|set to this description. The keys of this dictionary are the names of the emotes, and the values are a non-empty array of emote IDs for that name.

Example

local hd = Instance.new("HumanoidDescription")
hd:AddEmote("Salute", 3360689775)
local emotes = hd:GetEmotes()
for name, ids in pairs(emotes) do
    print(("The emote %s has %d ids:"):format(name, #ids))
    for _, id in pairs(ids) do
        print(id)
    end
end

See also

  • articles/HumanoidDescription System, for more information on HumanoidDescriptions
  • HumanoidDescription/SetEmotes|SetEmotes and HumanoidDescription/AddEmote|AddEmote, which can add emotes that may be returned by this function
  • HumanoidDescription/EmotesChanged|EmotesChanged, which fires with the value returned this function after it may have changed

Returns

Return Type Summary

A dictionary of emotes where the key is the emote name and the value is an array of emote asset IDs. Example:

{
    Salute = {3360689775},
    Agree = {4849487550},
    Disagree = {4849495710}
}