Hi, I’m trying to find how I put my emote animation in the “/e” command section, I’ve seen people do it but I have no clue how to do it.
You could use the Player.Chatted
event on game.Players.LocalPlayer
, and see if the message is something like “/e dance69”, then load & play an animation on the character’s animator.
An example of this (LocalScript in StarterGui/StarterCharacterScripts):
Code
local player = game.Players.LocalPlayer
-- Get the character, humanoid, and the animator to load the animations
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild('Humanoid')
local animator = humanoid:WaitForChild('Animator')
player.Chatted:Connect(function(msg)
if msg == '/e dance69' then
-- Load the animation and play it
local animation = animator:LoadAnimation(script.edance69)
animation:Play()
-- Optionally, stop it when the character moves
local moveConnection =
humanoid:GetPropertyChangedSignal('MoveDirection'):Connect(function()
moveConnection:Disconnect() -- Stop detecting movement
animation:Stop()
end)
end
end)
-- There are many ways to do this, but I think this is probably the easiest & fastest.
If you get the “Animate” script and put it in StarterCharacterScripts, (if you don’t know how you can probably search for it on google or something like that) you can go into the animNames table and add a custom one. (The table that starts on line 39) I believe that should work, but I haven’t tried adding any on before.
He’s asking how to put his command in the command lists.
When you test the game, you should see a local script inside of the character called “Animate”.
Copy that and paste it into the StarterCharacterScripts folder.
Inside the script starting at line 39, there’s a huge list of emotes.
Just copy and paste one of the emotes, place it at the bottom, change the name to whatever you want the /e command to be, and replace the id number in the link thing with the id of your animation.
There is also a table underneath called “emoteNames”. Add a comma and then “(your emote name) = true” at the end of that table. The names have to be the exact same for the emote to work.
Let me know if you need help understanding anything. I’m not very good at explaining things so I understand if you have trouble with the instructions.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.