Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make an NPC have the default roblox animations?

Asked by 5 years ago

I am trying to make a NPC R15 rig have the default roblox animations, so, for example, if I call Humanoid:Move() on it, it should walk with the default walking animation (btw I'm using Humanoids). My first try was to copy the Animate LocalScript from a player's character, put it in ServerScript (also called Animate), and then put it in the NPC (I also put the IntValues inside the script, if you are wondering). I even tried deleting and/or pcall() wrapping the part that errored (which referenced game.Players.LocalPlayer), but it still didn't work (because that wasn't the reason it didn't work, it did stop erroring though) Any other ways to do this?

1
I just tried putting the code from the default "Animate" script into a ServerScript, and it works. Make sure to remove line 730 to 742 though as that references the LocalPlayer. InfinitivePixelsJr 542 — 5y
0
I said I have already tried that, it still doesn't work. throwawayaccount2001 102 — 5y
0
WAIT NEVERMIND THE HUMANOIDROOTPART WAS ANCHORED LEL SORRY throwawayaccount2001 102 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Note to self: Always unanchor the HumanoidRootPart.

1
oh TheRealPotatoChips 793 — 5y
0
if you want npc's to have default animations, copy and patste the animation script into the npc and remove any code that tries to do something to the player in game.Players. the npc isn't a player so if we dont do this itll error royaltoe 5144 — 5y
Ad

Answer this question