I want to find out if when a Players adds an image ID if the image ID is valid.
COMMUNITY QUESTION
How do I check if a Image ID is an actual Asset?
1 answer
function IsImageValid(id)
local isimage
local success,message = pcall(function()
local imageid = game:GetService('MarketplaceService'):GetProductInfo(id)
isimage = imageid.AssetTypeId == 1
end)
return success and isimage
end
Pretty much the same thing as the IsGameValid function, but it does it for images.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Make sure to use
isimage = imageid.AssetTypeId == 1 or imageid.AssetTypeId == 13if you wish to also include decals.^ yes, but there's no way I know of to convert decal ids to image ids