Putting clothings on NPC without humanoid

Hey, I have searched around looking for answers, I’ve yet not found anything.
My problem is that I want my game to run as smoothly as possible and I am trying to resort to reducing lag from NPC and I found that humanoid is a huge factor in lag.

What are the ways I could do this? I am thinking decals but it seems a bit unnecessary.
If you’re able to do this, mind giving us an open source? Would be much appreciated :pray:

3 Likes

I don’t think this is possible, you will have to be willing to crop out sections of the clothing template and use a decal and add it onto the player.

I can see why it seems impossible but here’s why I am asking for help:
https://twitter.com/MingRBLX/status/988841152110526464
I saw it on this video.

From that video, it looks like surface guis are being used on every surface of the character. From there I would presume you would put a image frame, load the specific shirt / pant image id, then change the image rect size / offset to map the specific part of the shirt template.

Just a rough thought, don’t know if that would be an efficient way of doing this.

1 Like

I don’t know that there is any easy way to accomplish what you’re looking for. If you use decals, the wrapping of the textures get funky and you would have to do some UV mapping of some sort…? (Don’t ask me I have no clue when it comes to UV mapping)

However if you’re worried about performance, I’ve read somewhere that if you set the Humanoid’s State to Physics it disables quite a bit of the unnecessary calculations done which eats at performance. If you have a static NPC then that could save you just enough.
If you’re moving the NPC around, perhaps doing the same thing but path find the points and CFrame the path on the server and apply animations on the client? I could be wrong because I haven’t done any testing with this. :V

1 Like

Humanoids render clothing. You can’t use the Shirt or Pants classes/objects without one.

Non-humanoid clothing is, as posted earlier, a result of using SurfaceGuis and Rect properties.

To reduce lag from idle humanoids, you can do things like disable all states which ride of unnecessary physics calculations (again, as posted earlier).

I’m guessing that you could get the source image of a shirt, and use surface GUIs + imagelabel imageoffset and size to position only certain parts of the template in the frame of the character.

10 Likes

Why not just ask the guy who did it and save everyone the trouble and time?

@SirMing

Yes

5 Likes