I was trying to make a music player and thought of making a script that identifies an asset if it is valid, invalid, or not a sound ID, but it made me think "how can I find the results directly from the sound instance?" I researched and find no results. For now I haven't made a code. Does someone know an easy way to make a script which identifies asset id's presence and validity?
You could use MarketPlaceService:GetProductInfo() to find if the sound exists in the website library or not.
local mas = game:GetService('MarketplaceService') local soundId = 0 local asset = mas:GetProductInfo(soundId) if asset.Name ~= nil then print('exists') else print("doesn't exist") end