You can edit the Pants and Shirt object in a character. If there isn't one, you can insert is with Instance.new("Shirt") and Instance.new("Pants"). Make sure to rename it "Shirt" and "Pants" respective to the class because it inserts both the pants and shirt with the name "Clothing" and it will be hard to distinguish without renaming it.
Then you change the Shirt/PantsTemplate in the object with the id you want.
To do hats you just do this,
hatModel = game.InsertService:LoadAsset(--ID of hat here--)
Now, InsertService inserts things inside of models, and you need to inside the model to make the hat's parent the character.
So you do this:
for _, v in pairs(hatModel:GetChildren()) do
v.Parent = character --Or whatever you indexed your character as--
if hatModel then hatModel:Destroy() end
end
What this does is look inside of the "hat" model and finds objects within it. The it puts the items inside of the character and deleted the now empty model -- just so everything's neat and there's no empty models littering the game.
Hope this helped! |