-
What do you want to achieve?
I want to create my own emotes that are playable by using /e command.
I currently have made one emote called “rat”, which is just the Rat Dance meme. -
What is the issue?
The problem is that, instead of playing the emote, I instead get this error message in chat:
-
What solutions have you tried so far?
I tried looking for solutions on the Forums, but none of the found Posts helped.
Edit: Forgot to mention that I tried setting UserEmotesEnabled to false and this is the error message I got instead:
I also tried adding prints in each function to see if they were even fired and they weren’t.
I’m genuinely stumped by this. I know it’s possible, since Combat Warriors has this exact system implemented.
This is the code I used for the emotes. It is taken directly from the default Animate script and inserted into my custom one with a few changes.
game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
print(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 (current_pose == "Standing" and emote_list[string.lower(emote)] ~= nil) then
play_animation(emote, 0.1)
end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(emote)
print("BROTHER PLSSSS")
if (current_pose == "Standing" and emote_list[string.lower(emote)] ~= nil) then
play_animation(emote, 0.1)
return true, current_track
end
-- Return false to indicate that the emote could not be played
return false
end