Setting Clothing

Hey, how would I get the template for adding a shirt to a player.
On the catalog it’s 3079274247 yet I need to get the ID 3079274231 (the template image).

That’s 16 different, and with other shirts, etc it’s different.
How would I reliably apply catalog shirts to players in-game?

If I’m not mistaken you can use a HumanoidDescription to change Shirt, Pants, BodyColor, Accessories, BodyScale, and Animations. Developer page here.

If I remember correctly, you can use the Shirt instance and the Pants instance to set the clothing.
You can use either the catalog ID or the template ID.
Both work.
Shirt reference.
Pants reference.

“The content ID link pointing to the shirt template hosted on the Roblox website.”

It seems that using the catalog ID (3079274247) changes into the template ID (3079274231).

If you set it manually in studio, not if you’re doing it through a LUA file.

Change the clothing using the template ID (3079274231).
Change clothing to the shirt you want to change.

clothing = "rbxassetid://3079274231"

I’ve already been using the Template ID, was wondering if there was any way to convert a Catalog ID into a Template ID progrmatically, for configs, etc. So the user has ease of access and doesn’t need to find the Template ID.

I took this from ScriptingHelpers.

local plr = game:GetService("Players")["PLAYER NAME HERE"]
local model = nil
local succ, err = pcall(function()
    model = game:GetService("InsertService"):LoadAsset(CLOTHING ID HERE)
end)
if succ then
    if model:FindFIrstChild("Shirt") then
        model:FindFIrstChild("Shirt").Parent = plr.Character
        model:Destroy()
    end
else
    warn("Could not load clothing. Error: " .. err)
end
1 Like