Answered by
5 years ago Edited 5 years ago
- Play the game in studio
- Go to workspace and find your character model
- Find the child in your character model named "Animate"
- Right click and copy "Animate" or Click on it and press shortcut on keyboard cmd+c if Mac or ctrl+c if Windows
- Stop game
- Paste "Animate" into NPC model
- Create a new server script ("script" NOT "localscript") inside NPC model
- Name the new script "Animate"
- Open "Animate" and select all
- Paste text of "Animate" into the new script
- Copy all children of "Animate" into the new "Animate" script
- Delete the localscript "Animate" and its children
- Open new "Animate" script and delete section for chat emote since NPC won't use chat and there will be an error that player is nil because NPC is not a player
- Go to the children of "Animate" and open the desired animation you want
- Copy and Paste in the desired animation URL or AssetID into the animations
When the NPC walks or jumps or do other actions, it will be using the animations in "Animate"
-----------[[Get Rid of This in the "Animate" script, located towards the end of the script]]-------------
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)