I scripted an emote, which basically is supposed to work perfectly, but when trying to test it, in the chat it says, "You can't use emotes here." In red text. Can anybody help me? This is annoying. The code used for the script looks like this:
prefix = "/e "
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(m)
m = m:lower()
if m == prefix.."weirdspinning" then
local a = Instance.new("Animation",p.Character)
a.AnimationId = "rbxassetid://3336554633"
local h = p.Character:FindFirstChild'Humanoid'
local s = script.rotate
local t = h:LoadAnimation(a)
s:Play()
t:Play()
end
end)
end)
I also added a sound named "rotate" which is why there's the "local s = script.rotate" and the "s:Play()" thing. The sound plays perfectly fine, but the animation is the problem. Because, obviously, it says "You can't use emotes here." In red text, in the chat.

2 comments
You should edit the actual Chat code.
How do I do that?