PcoWSkbVqDnWTu_dm2ix

Emote Bar

Emote Bar

Emotes are a core component of any metaverse experience. The EmoteBar developer module aims to provide players an accessible, customizable way to facilitate meaningful social interaction.

Module Usage

Installation

To use the EmoteBar module in an experience:

  1. Visit the EmoteBar marketplace page, click the green Get button, and confirm the transaction.
  2. In Studio, open the toolbox (ViewToolbox).
  3. Select your toolbox Inventory section.
  1. Locate the module item and click it or drag-and-drop it into the 3D view.
  2. In the Explorer window, move the entire EmoteBar folder into ServerScriptService. Upon running the experience, the module will distribute itself to various services and begin running.

This and other developer modules come with an Install script that runs the installer and distributes the contents of the module to the same services that the folders are named after.

The Install script can be utilized as follows:


EnableLogging — Set to true to enable debug logging for the current developer module. This lets you see how the module gets distributed, along with how each package is linked.


InstallStarted — Fires when the installer first starts up. You can hook into this event to run any pre-install steps.


InstallFinished — Fires when the installer has finished installing the module. By this point, the contents of each service folder has been distributed. You can also hook into this event to run any post-install steps.


Install() — Installs the given developer module by overlaying each of the service folders over existing services. For example, a folder named ReplicatedStorage containing an EmoteBar script will be distributed to game.ReplicatedStorage.EmoteBar when installing.


Configuration

The module is preconfigured with 9 emotes, but it can be easily customized with your own emotes and display options.

  1. In ServerScriptService, create a new Script and rename it ConfigureEmotes.
  1. Paste the following code into the new ConfigureEmotes script. The setting on line 5 overrides the default emotes and lets you define custom emotes via the setEmotes() function on line 8.

Mega Emotes

A mega emote is formed when multiple players in the same area perform the same emote at the same time. As more and more players join in, the mega emote grows larger. As players stop performing the emote, the mega emote grows smaller until eventually it disappears.

Tempo

An emote’s tempo is the speed at which it plays when its button is tapped once. The default speed of an emote is determined by its defaultTempo. An emote’s speed can be increased or decreased by tapping its button faster or slower.

API Reference

Enums

EmoteBar.GuiType

Name Value Description
EmoteBar 0 Default form where emotes are displayed in a bar along the bottom of the screen, separated into individual "pages."
EmoteWheel 1 Variant where emotes are displayed in a ring when a player clicks or taps on their player character.

Functions

configureServer()

void configureServer ( table config )

Overrides default server-side configuration options. This function can only be called from a Script and changes will automatically replicate to all clients.

Key Default Description
useDefaultEmotes true Whether the provided default emotes are included or not.
useMegaEmotes true Enables or disables the mega emotes feature.
emoteMinPlayers 3 Minimum number of players performing the same emote to contribute to a mega emote.
emoteMaxPlayers 50 Maximum number of players performing the same emote to contribute to a mega emote.
playParticles true Enables or disables the emotes players are playing as floating particles above their heads.
sendContributingEmotes true Enables or disables sending a small emote icon to contribute to the mega emote.

configureClient()

void configureClient ( table config )

Overrides default client-side configuration options. This function can only be called from a LocalScript. Depending on the value of guiType, options in the noted tabs also apply.

Key Default Description
guiType EmoteBar.GuiType.EmoteBar Controls which form the GUI will take for displaying emotes. See Enums for options.
useTempo true Enables or disables the tempo feature where users are able to control how fast or slow their emotes are played by repeatedly activating the same emote rhythmically.
tempoActivationWindow 3 Amount of time, in seconds, the user has between sequential activations of an emote for it to count as part of the tempo.
lockedImage "rbxassetid://6905802778" Image to display overtop locked emotes.
Key Default Description
emotesPerPage 4 Number of emotes that are displayed at a time. Emotes may be visually cropped at values higher than 8.
useEmoteHotkeys true Whether emote hotkeys are used. If true, this binds 1, 2, 3, 4 , etc. as hotkeys for the emote bar. Only numeric keys 1–9 are supported.
usePageHotkeys true Whether page hotkeys are used. If true, nextPageKey and prevPageKey are used to cycle between pages.
prevPageKey Enum.KeyCode.Q Key used to cycle to the previous page of emotes.
nextPageKey Enum.KeyCode.E Key used to cycle to the next page of emotes.
leftArrowImage "rbxassetid://6998633654" Image for the left arrow (previous page).
rightArrowImage "rbxassetid://6998635824" Image for the right arrow (next page).
Key Default Description
closeImage "rbxassetid://7027440823" Image for the close button on the emote wheel, placed overtop the closeBackgroundImage image.
closeBackgroundImage "rbxassetid://7027440823" Background image for the close button on the emote wheel.
emoteHoverImage "rbxassetid://7344843157" Image for hover-over indication of the selected emote in the wheel.

setEmotes()

void setEmotes ( table emotes )

Sets the custom emotes to use. These will be added to the defaults if useDefaultEmotes is true, or replace the defaults if useDefaultEmotes is false. This function can only be called from a Script and changes will automatically replicate to all clients.

Each emote in the array accepts the following key-value pairs:

Key Type Description
name string Emote name.
animation string Asset ID for the emote's animation.
image string Asset ID for the emote's image in the GUI.
defaultTempo number The default speed factor at which to play the emote animation. For example, a tempo of 2 will play the animation at twice its normal speed.
isLocked boolean Whether the emote is "locked" from being activated.

setGuiVisibility()

void setGuiVisibility ( bool visible )

Shows or hides the emotes GUI. This function can only be called from a LocalScript on a specific client.

getEmote()

table getEmote ( string emoteName )

Gets an emote by name. Returns nil if the emote cannot be found. This function can only be called from a LocalScript on a specific client.

playEmote()

void playEmote ( table emote )

Plays the given emote and fires the emotePlayed event on the server, if connected. This function can only be called from a LocalScript on a specific client.

unlockEmote()

void unlockEmote ( string emoteName )

Unlocks the emote with the given name. This function can only be called from a LocalScript on the client.

Events

emotePlayed

RBXScriptConnection emotePlayed ( Player player, table emote )

Fires when any client plays an emote. This event can only be connected in a LocalScript.

lockedEmoteActivated

RBXScriptConnection lockedEmoteActivated ( table emote )

Fires when a client clicks a locked emote. This event can only be connected in a LocalScript.


Previous In-Experience Profile Next Spawn with Friends