How to make a Custom NPC Humanoid?

I know very well that many Humanoids can cause a lot of lag, and some solve it by creating their own humanoids, what is the best way to do this?, And how do I reproduce animations in those custom humanoids? How do I put clothes on they?

Is there any other way to reduce the lag caused?

This custom humanoid I need should just walk and sit.

1 Like

The reason that many Humanoids cause lag is simply numbers. Implementing them in lua isn’t going to improve their performance at all unless you’re removing features from them. Rewriting Humanoids from scratch is also a huge task.

I’d just recommend sticking to Roblox Humanoids, otherwise you can search the forum for some custom Humanoids but that most likely will only make performance worse.

1 Like

I am sure that this would ensure a better performance because as I said It would only walk and sit, and I need to do it myself because the open sources I find does not work for me.

As long as those are the only features you use with Roblox Humanoids you shouldn’t have too much of an issue. If you anchor the root part of the Humanoid (HumanoidRootPart if it exists, otherwise UpperTorso or Torso) when it isn’t moving it should also prevent any physics lag from the humanoid.

I still think I can optimize it a lot more.

Ask yourself: “Why do I need custom humanoids?”

What is the project? How will Humanoid NPCs drain performance? Are custom Humanoids going to be better?

I recommend staying with humanoids unless you don’t plan to use any of their useful features, which is doubtful. You can still optimize the default humanoids significantly:
https://devforum.roblox.com/t/humanoid-internal-hindrance/20057

Otherwise, this is a really vague question. There’s no single way to make your own custom “humanoid,” and as such the approach you take will be different depending on the situation. Hopefully this helps. :slight_smile:

3 Likes