generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How can I check if an ID is a soundID?

Previous Thread :: Next Thread 
CUBES4LIFE is not online. CUBES4LIFE
Joined: 22 Jun 2009
Total Posts: 4956
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
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
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 is not online. 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
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
20 Jun 2015 02:20 AM
woah nice name. ^

and yeah... forgot about that.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image