"You can't use that emote"

Is there any way to disable this annoying message?
This was just chucked into the engine with complete disregard for all the games that have custom emotes.

6 Likes

Need more information. What’s the problem? When does this occur? What are you trying to accomplish? Vague posts generally get vague answers.

You can disable the EmotesMenu using StarterGui:SetCoreGuiEnabled. Does this help your problem? Or are you referring to chat command emotes?

1 Like

That’s because your custom emote system probably doesn’t use ROBLOX’s Lua Chat System
https://developer.roblox.com/en-us/articles/Lua-Chat-System

Simple fix is to comment out when the ClientChatModules.CommandModules.PlayEmote sends the error message

if not emoteName then
	-- sendErrorMessage(channelObj, LocalizationKeys.NoMatchingEmote)
	return true
end

Here’s a fixed version of the scripts:
ChatFix.rbxm (119.3 KB)

Throw that model in the Chat service and ungroup it.

Note: When the chat scripts get updated you will probably want to update the scripts and re-comment out that sendErrorMessage line. You can find more information about how to update the scripts here

9 Likes

Can I delete messages?
I know that I can go in and modify these scripts, but it’s certainly not ideal to do something that would of course lead to one script in my game ending up outdated unless I diligently maintain it (which I won’t).
I’m only one person, and my players never ever report bugs (even if thousands have their game crashed by one thing), so I don’t want to create a new way for my game to break.

Well, sadly, you’re going to have to if you want to use this method

If this behaviour has been built into the default scripts, there’s nothing you can do about it at runtime for security. The corescripts can’t be modified as the game is running for good reason.

I do, too, find it to be added without regard for what other games have in terms of emotes. I think this feature would have been good if added with an API for adding custom emotes to the /e options.

My idea for a solution

Instead of using /e for your emotes, maybe use another prefix, such as /emote or similar. When a user types /e in the chat, publish a message which stating to use /emote instead. This will fit with the system message by the corescripts too.

This eliminates the need to fork the corescripts and maintain them, as you said you won’t be able to.

1 Like

What I wrote is probably you’re best hopes in removing that message without moving your custom animation commands to the chat module.

I wouldn’t worry about that script breaking. It’s was recently written and seems bug free. The only downside of forking and modifying the scripts is that you won’t immediately have access to any new chat features that are added. But updating isn’t difficult and the wiki page I posted above goes over how.

Other comments have how to disable or work around it, so I won’t comment on that, but I do have a recommendation. You could make it a GUI menu if you know how to.

Hope this helps!

Yes, but OPs problem is that they don’t want to have to maintain the chat modules. Yes, it isn’t that hard to update the script, but there could be a number of things that add friction to the process. It’s best for OP’s situation to try and avoid forking the corescripts.

You should never assume that. New features, bugs or improvements could happen at any time. Also, a lot of the chat implementation is actually in C, so if something on that level changes, keeping the current scripts may break the chat completely.

I’m not sure if the solution I gave completely fixes OP’s issue, but until something better comes along on Roblox’s end, there’s not much we can do, especially without forking the corescripts.

This is… not true. The chat system is fully ported to Lua and the C features available in the chat system are also available for developer use. Such APIs are typical APIs you’d use in other bits of code.

https://developer.roblox.com/en-us/articles/Lua-Chat-System

1 Like

Despite this, it is still true that improvements could happen without notice, and get missed by the OP.

Ok, they may not be completely breaking for the chat, but it still isn’t a good situation to be in, essentially being a patch behind other users.

If you want a hack to do this at runtime without forking the chat modules, you can put something like this into StarterPlayerScripts:

local m = getmetatable(require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("CommandModules"):WaitForChild("Util")))

local old = m.SendSystemMessageToSelf
m.SendSystemMessageToSelf = function(self, msg, ...)
	if msg == "You can't use that Emote." then
		return
	end
	return old(self, msg, ...)
end

Though keep in mind, this can break/change at any time, hence why you’re advised to edit the chat modules fork instead.

3 Likes

I like this more than my method.

Your message string is incorrect though. These are the Emote error strings from Chat.ClientChatModule.CommandModules.PlayEmote:

local FallbackStrings = {
	[LocalizationKeys.NotSupported] = "You can't use Emotes here.",
	[LocalizationKeys.R15Only] = "Only R15 avatars can use Emotes.",
	[LocalizationKeys.NoMatchingEmote] = "You can't use that Emote.",
	[LocalizationKeys.TemporarilyUnavailable] = "You can't use Emotes right now.",
}

So the message you check for should be "You can't use that Emote."

1 Like

Well, this is what I was getting, hence why I used that message
Screenshot_20190725-225926_Roblox

Thanks for pointing it out though, I will edit my reply

Now that I think about it, it’s not mobile-friendly to have emotes require typing.
Maybe I should have an emote GUI?
How do emotes work on mobile?