Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[Sound, Texture and Other ID's] Can we identify types of ID's?

Hi guys!

Im creating a sound player through GUI. Obviously, a Sound instance will not work with an Image ID. In order to mitigate any errors, is it possible to identify an ID which the user has entered (Eg Sound, Texture, item etc)?

1 answer

✓ Accepted answer

It appears that the MarketplaceService can give this information.

http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/GetProductInfo

local info = game:GetService("MarketplaceService"):GetProductInfo(asset_id)
print(info.AssetTypeId)

The list of asset types is here:

http://wiki.roblox.com/index.php?title=Asset_types

2 comments

0

Great! thanks for the help! One more thing: Do you know why TextBoxes are not working on SurfaceGui's?

0

Create a question and I will make an answer for you. I believe there is also another person suffering from this problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.