Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Verify decal ID via script

Asked by
TomsGames 225 Moderation Voter
10 years ago

So this has been used in many places, but I have no idea how it works.

Basically, a user inputs a number (A.K.A. the decal ID) and I need the script to verify that the decal ID is valid and is registered and working etc...

How can I do this? Thanks!

1 answer

Log in to vote
3
Answered by 10 years ago

You can thank an epic update that brought the MarketPlace service for this. Here is an example script:

local ID = game:GetService("MarketPlaceService"):GetProductInfo(9001,"AssetTypeId")
if ID == 13 then
    print("Item 9001 is a Decal")
end

Get a full list of types of items here: http://wiki.roblox.com/index.php?title=Asset_types

0
Thanks 18cwatford for making the link clickable. FromLegoUniverse 264 — 10y
0
Tysm TomsGames 225 — 10y
0
No problem... took me a minute to figure out what Tysm meant. :P FromLegoUniverse 264 — 10y
0
Haha :p I'm getting errors :S TomsGames 225 — 10y
View all comments (2 more)
0
Hmm... let me double chect the wiki post. FromLegoUniverse 264 — 10y
0
Fixed (I hope) FromLegoUniverse 264 — 10y
Ad

Answer this question