|
| 20 Jun 2015 02:12 AM |
Letting players input their own sounds, how can I check to make sure the ID is a valid soundiD?
red solo cup, lets have a party // R$141 // Trade with me: http://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=3495457 |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2015 02:17 AM |
function checkIdType(id, type) local item = game:GetService("InsertService"):LoadAsset(id) for i,v in next, item:GetChildren() do if v:IsA(type) then return true end end end
checkIdType(00000, "Sound") |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 20 Jun 2015 02:19 AM |
You could use MarketplaceService, as in its GetProductInfo method and then use the AssetTypeID that it gives you (in a table).
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/GetProductInfo
|
|
|
| Report Abuse |
|
|
|
| 20 Jun 2015 02:20 AM |
woah nice name. ^
and yeah... forgot about that. |
|
|
| Report Abuse |
|
|