If I try applying this ID of pants to a Humanoid,382537806 via code it does nothing, however if I manually put that into the PantsTemplate, it changes its number and then works? Why is this a thing? Since when was this a thing? How can I add pants to a character via code and not have to do it manually?
Youâre using the asset id (the website id) not the image id (something else i guess, not 100% sure on the term).
You need to do the âchange the number thingâ in the shirttemplate and when it gives you the correct id you can use that.
So in other words I have to manually do it? I know of the whole â-1 away from the idâ to get the template, but that doesnât always work and template can sometimes be hundreds of numbers away.
It hasnât because Iâve used this exact same chunk of code in a previous game and had it work in that game 1-2 years ago
game:GetService("InsertService"):LoadAsset(pantsId)
-- returns a model with the proper pants instance inside
-- also works with shirts & t-shirts and pretty much any accessory
Problem with this is Iâd have to load it in from the server (trying to do all this via client) and just too much work for just 1 line of code in the server to do 1 small thing
I was going to suggest HumanoidDescriptions, but it seems that like InsertService they only work through the server. Not sure thereâs any simple method of doing so through the client alone.
Is there a reason that the client canât request info from the server which the server returns back? Just because some things do not work on the client doesnât mean the server canât help.
Arenât you renaming NewPants to Pants at line 2? If I remember correctly, doesnât that mean youâd have to change the names of the NewPants s below that? Try adding line 2 last, and see if that works.
Edit: I know this is an old thread, but I still want to help out if I can.