Humanoid:StopEmotes() or something like that

As a Roblox developer, it is currently too hard to …
Stop an emote from playing. You can play an emote (doc) but there is no method to stop it which means if I want to play a custom animation afterwards and not all the body parts have keyframes, the emote and animation will both be playing at the same time and not look right.

If Roblox is able to address this issue, it would improve my development experience because …
Currently the best way to get around this is to fork and modify the animate script which is bad. With an official method such as StopEmotes() I wouldn’t have to do this.


Humanoid:GetPlayingAnimationTracks()[EmoteName]:Stop() ?

It’s a deprecated method so I’d rather not use it. Though I guess the feature request could be to un-deprecate this method.

Never mind you’re right, there’s an identical method Animator | Documentation - Roblox Creator Hub
But it seems like the names don’t match with HumanoidDescription:GetEmotes so I can’t tell if the animation is an emote or a custom animation

Just use the method right before playing the custom animation

I can do a bunch of different tricks to get what I want but I’m asking for a simple function I can call so I don’t have to do any tricks. To me it makes sense for there to be a StopEmotes if there’s a PlayEmote

A humanoid alone doesn’t have emote data, while the animate script does. It would be better if you used @yoshicoolTV’s method.

1 Like

I don’t think I get what you mean but Humanoid:PlayEmote is a thing so does it need this data you mention?

I believe all it does is check whether the player owns the emote, before then firing the PlayEmote BindableFunction under the default Animate script:


The Animate script is seemingly the one that’s doing all of the work, :PlayEmote is likely just a helper function meant for developers to easily… play emotes, so technically, yes they could definitely implement a :StopEmote if they wanted. However, :PlayEmote was introduced back in 2019, and Roblox’s mindset on scripting APIs may have changed since then, so they may not want to implement it.

But, maybe they could just have :PlayEmote return the emote AnimationTrack instead of creating a new function? That seems a little more likely. For example:

local EmotePlayed, Emote = Humanoid:PlayEmote("Hello")

if EmotePlayed then
    -- I want all emotes to play for a set amount of time, so I can just do this!
    Emote.Looped = true

This would, however, mean that they would have to make changes to the default Animate script and also account for cases where someone’s game uses an older version of said script.

It wouldn’t be as good as a new function because I’d still have to store that animation track somewhere if I wanted to have a reference to it from another script, but this is still better than what we have to do currently.

I think people are generally aware that when they fork a script it’s not going to be the most up to date version so this shouldn’t be a concern.