Hey Developers,
We have released a new way for users to express themselves in-game through Emotes!
Players are able to buy Emotes in the Catalog and use these Emotes through the in-game menu and the /e
or /emote
chat command. Players can equip up to 8 Emotes using the web or mobile Avatar Editor which will appear in the Emotes Menu UI. They can use any of their purchased emotes with the chat command, not just the ones that they have currently equipped.
The Emotes Menu is enabled by default but can easily be disabled by developers if Emotes are not a good fit for your game. To disable the Emotes Menu you can use the StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
API. This will disable the UI only, to disable loading custom Emotes that users have purchased in the Catalog set the StarterPlayer.UserEmotesEnabled
property to false
.
Users can open the menu with the new button in the TopBar or by using the radial menu if they are using a gamepad.
Emotes APIs
The Emotes Menu can be opened and closed using GuiService:SetEmotesMenuOpen()
, you can check if the menu is open using GuiService:GetEmotesMenuOpen()
-- Open the emotes menu
local GuiService = game:GetService("GuiService")
GuiService:SetEmotesMenuOpen(true)
Developers can customize the Emotes that a user has access to in their game. In a script, this can be done by calling SetEmotes()
on a playerās HumanoidDescription object. Once set, specific emotes can be equipped via the SetEquippedEmotes()
API.
Here is an example of a script which can be placed in StarterCharacterScripts
to give all players a list of specific emotes in your game.
local character = script.Parent
local humanoid = character.Humanoid
local humanoidDescription = humanoid.HumanoidDescription
-- Load custom emotes
local emoteTable = {
["Salute"] = { 3360689775 },
["Stadium"] = { 3360686498 },
["Tilt"] = { 3360692915 },
["Point"] = { --[[EMOTE ID HERE]] },
["Cheer"] = { --[[EMOTE ID HERE]] }
}
humanoidDescription:SetEmotes(emoteTable)
-- Equip emotes in a specific order
local equippedEmotes = { "Salute", "Stadium", "Tilt", "Point", "Cheer" }
humanoidDescription:SetEquippedEmotes(equippedEmotes)
You can play emotes in a users HumanoidDescription
using the Humanoid:PlayEmote(string name)
API.
local Players = game:GetService("Players")
local humanoid = Players.LocalPlayer.Character.Humanoid
humanoid:PlayEmote("Wave")
ā
There will be more information about using this feature in the Developer Hub article that is soon to be released. We will update this post with a link to that article when itās available.