Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make an NPC have the default roblox animations?

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?

3 comments

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.

0

I said I have already tried that, it still doesn't work.

0

WAIT NEVERMIND THE HUMANOIDROOTPART WAS ANCHORED LEL SORRY

1 answer

✓ Accepted answer

Note to self: Always unanchor the HumanoidRootPart.

2 comments

1

oh

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

This discussion is preserved as it was. New answers, comments, and votes are closed.