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

Reliable method of getting the Shirt or Pants ID? [solved]

Asked by
gitrog 326 Moderation Voter
6 years ago
Edited 6 years ago

So, with getting the ID from shirts or pants, it's usually Asset - 1, but not always. Is there a more reliable way of getting it than just subtracting 1? This is my script, but it doesn't load the clothing.

frame.btnPurchase.MouseButton1Click:Connect(function()
    if chosenId > 0 and player.WalletBalance.Value >= price then
        local assetSelect = game:GetService("MarketplaceService"):GetProductInfo(chosenId, Enum.InfoType.Asset)
        local itemType = ""

        if assetSelect.AssetTypeId == 11 then
            itemType = "shirt"
        else
            itemType = "pants"
        end     

        chosenId = assetSelect.AssetId - 1
    end
end)

1 answer

Log in to vote
-2
Answered by 6 years ago

Just copy the id from roblox website, make a decal, paste id into texture from properties and it will give you the asset id

0
But people who are non developers dont follow nor read the wiki which has the thing which tells u that decals need one to be subtracted hiimgoodpack 2009 — 6y
0
But I'm also getting the asset info. No big deal, I solved it. gitrog 326 — 6y
Ad

Answer this question