Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Id grabber for catalog help?

Asked by 3 years ago

I am trying to create a gui and if you type in the text box the clothing appear how should I attempt to do this.

0
More: I tried to do it and when I type the code the shirt is blank Bakery_quxxn 0 — 3y
0
not a request site CrazyCats84 154 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Shirts only appear if you use the Template ID, not the actual Shirt ID. Try using this function to create a shirt:

function CreateClothing(assetId)
    local url = "https://www.roblox.com/catalog/".. assetId
    local id = tonumber(string.match(url, "%d+") or 0) 
    local success, clothing = pcall(function() 
        return game:GetService("InsertService"):LoadAsset(id) 
    end)
    if success then 
        clothing.Parent = DefineCharacterHere
    end
end
Ad

Answer this question