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