How can we ensure a product id is a sound id?

Basically, i’m making a dj system that should be advanced enough to not crash and work efficiently without any sort of issues.

But i found one issue which would break the entire system if somewone bought the product and used a place id instead.

Any fixes for this kind of things?

if game.MarketplaceService:GetProductInfo(ID).AssetTypeId == 3 then
    -- If it's 3 then it's an audio clip
end
1 Like

Going to test the following real quick to see if it could work

This indeed worked. Thanks for letting me know about it.

1 Like