In roblox, each article of clothing annoyingly contains two separate ids, one for the catalog and another for the shirt template. In roblox studios, to give a humanoid a shirt, one uses the shirt template id. However, players usually use the catalog id when searching for clothes. This isn't much of a problem if a player were to manually insert a piece of clothing to a player as studios automatically converts the catalog id to the template id as soon as enter is pressed, however, if one were to implement a script where a catalog id is inserted, and given to the player as a template id, it would not automatically be converted, thus the player's shirt would not change. Therefore I ask, is there any possible way to convert a catalog id to a template id with reasonable ease without having to scroll through every decal in the library to see if one matches up with the catalog shirt.
You cannot have an existing clothing then put the clothing ID in it even if you use "rbxassetid://" that wouldn't work. Instead you need to use LoadAsset[https://wiki.roblox.com/index.php?title=API:Class/InsertService/LoadAsset]. Here is a script
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