I know lots of games have their own animations when you type something in the chat preceded by "/e". (or maybe it's /c...). Is there an easy way for me to bind an animation to whenever a player types "/e ANIMNAME", where ANIMNAME is any string I want?
I made a script:
local anim = game:GetService("ReplicatedStorage"):WaitForChild("Animation") --where your animation is local text = "/e justice" --what to say game.Players.PlayerAdded:Connect(function(plr) plr.Chatted:Connect(function(msg) local pmsg = msg:lower() if pmsg == text then if plr.Character then local a = plr.Character.Humanoid:LoadAnimation(anim) a:Play() end end end) end)
I put the animation in ReplicatedStorage, this does though show the Roblox messages saying you cant use this animation. It does still work, I'm not sure how to get rid of that message.
Here is a GIF of it: https://gyazo.com/712b31bae8d01d4781a60d4c9a578249
Basically what this does is first of all waiting for player to be added, then if they chat we take the message and convert it to lower letters so this works even when you have upper-/lowercase letters. Then we just check for they character and then plays the animation.