That’s the problem though, I can’t this has to be automated as a user is putting a clothing ID through the system… Currently the current clothing ID being put in through the tuple is a existing clothing item.
local InsertService = game:GetService('InsertService')
function GetTemplate(assetId)
local template
local success, errormsg = pcall(function()
local obj = InsertService:LoadAsset(assetId):GetChildren()[1]
if obj then
if obj:IsA('Shirt') then
template = obj.ShirtTemplate
obj:Destroy()
end
end
end)
if success then
return template
else
return 'ERROR: '..errormsg
end
end
local ShirtTemplate = GetTemplate(assetId)
Oops, a little too late, but here’s a function I whipped up that’d do the trick.