I have an Id
, and I want to check if there is a shirt with the corresponding Id in the catalog
.
This is what I have, but it doesn't seem to work:
local function ValidShirt(shirtId) --//Check whether shirt id is valid local success, returned = pcall(function() local asset = marketplaceService:GetProductInfo(shirtId, Enum.InfoType.Asset) --//Return asset return asset end) --//No errors if success then --//Check if returned asset is a shirt return (returned.AssetTypeId == Enum.AssetType.Shirt) end end
Any solutions?