Best way to implement the default R15 animation script into a client-side NPC?

Basically I have an NPC that I created client-side for cutscenes. However, I’m struggling to implement the default animation localscript for R15 characters onto it.

What would be the best way of making the NPC have these animations under the same conditions as a player (as in walking when it walks, jumping when it jumps, etc)? Am I not allowed to read the humanoid’s states because it’s only client-side?

I know I could likely hard-code each and every thing with pseudo-functions, but I’d prefer to avoid that. So is it even possible to do this from client-side?

(my knowledge of what I can and can’t do client-side with animations/humanoids is sparse by the way)

Just take a copy of the Animate localscript, use a plugin such as Quenty’s Class Changer, and remove the bit about the player chatting. Then it’s as simple as parenting it to the NPC.

Thanks for the quick response.

What class would I be changing?

You’d change the LocalScript to a plain server Script.

Sadly the NPC still doesn’t seem to want to animate.
image

I’m taking a look through the script to make sure I didn’t forget to tweak anything, but I’m unsure as to whether it’s an issue with using a script/localscript or attempting to do it all client-side.

Odd. There’s always looking in the toolbox for one, there’s no shame if it’s just a few free models, not most of your game consisting of them.

I suppose, but I figure my goal is so niche that it probably isn’t common/even there.

There’s plenty of server-side animation scripts for R15 npcs.

Wait… I’m confused. Server-side NPCs I’ve already gotten to work, but the issue is client-side NPCs. I can’t seem to figure out how/if it’s possible to have them animated with a similar script.

Client side as in they’re in CurrentCamera?

Created from a LocalScript in StarterPlayer, parented into a folder in the workspace.

Basically the model is cloned from ReplicatedStorage.

edit as of solution: it’s now parented into the camera

Well, you should be able to use a server-side animation script in them like you would with the server-side NPCs. That’d be very odd if it didn’t work.

It works like that without FE, but with FE it seems like it might need info from the Humanoid that it can’t read. I’m honestly not sure, this is my first time trying this.

Hmm, I’m not sure then, sorry I couldn’t help.

1 Like

All good, I appreciate the help!

For now I’m going to try to figure out what is and is not allowed client-side.
This seems like an important thing:

edit: got it!
image
That was indeed the issue. I need to handle the animation somewhere else.

3 Likes