How can I disable the /e emotes so players can’t do like /e wave or /e dance in game. I found some other posts about this but they all seem outdated.
You have to use StarterGui and use the function SetCoreGuiEnabled.
local StarterGui = game:GetService("StarterGui")
local Success, Err
repeat
Success, Err = pcall(function()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
end)
wait()
until Success
Sometimes the function returns an error because StarterGui hasn’t loaded the CoreGui, so the repeat makes sure to repeat the function until it is successful. I also added a wait so it doesn’t crash the client.
That just turns off the emotes menu. But does it also turn off using emotes through the chat?
To turn off emotes in the chat, get the Animate script from the Character and remove the chat commands in the Animate script. The problem with this is that you can’t use the player’s animations, only the animations that are in that Animate script.
Yes, I suppose it’ll stop the emoting if you remove the animate part from the chat script.
Nope, just tested it.
Here’s the changes you need to make to the current version of Animate:
Around line 750 there’s this code:
-- setup emote chat hook
game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
local emote = ""
if (string.sub(msg, 1, 3) == "/e ") then
emote = string.sub(msg, 4)
elseif (string.sub(msg, 1, 7) == "/emote ") then
emote = string.sub(msg, 8)
end
if (pose == "Standing" and emoteNames[emote] ~= nil) then
playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)
end
end)
comment it out, and chat emotes won’t play. Play the game, copy the Animate script from your character, put it in StarterCharacterScripts.
Only works if you want to use the animations in that Animate script. If you wanted to load in roblox player animations this method won’t work.
A bit confused with what @bhristt said, so if I use your method will I still be able to use my own custom walk animations. Not sure if he was talking about the same thing just a little confused.
You will be able to use your custom walk animations because you’re putting in your Animate script into StarterCharacterScripts, but others won’t be able to use their custom animations because it’s not their Animate script, it’s yours.
If you want players to be able to use their custom walk animations, that solution is not the one you’re looking for.
I don’t want players to be able to use their own walk animations I am making my own. So in this case it would work.