I've tried tons of things to figure this out, but I can't seem to do it. I want to detect if the sound id is invalid so it will tell the user.
play.MouseButton1Click:connect(function() sound.SoundId = "rbxassetid://"..soundIdhere.Text sound.Playing = true Status.Text = "Song playing!" end)
There's a snippet of the script.
Use
game:GetService("MarketplaceService"):GetProductInfo(id).AssetTypeId==3
Basically, what it does is it will send "true" if it's an audio but "false" if it isn't
The id is from this: http://wiki.roblox.com/index.php?title=Asset_types You can add different ids for it, like for example, if you want only model ids, change the number "3" to the asset ID
Product infos: http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/GetProductInfo