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

How can I get an image id from a decal id?

Asked by 4 years ago
Edited 4 years ago

So let's say a player wants to put this decal somewhere in a game: https://www.roblox.com/library/3372561114/--

They input the assetid into a TextBox: 3372561114

I put that assetid on a decal

SomeDecal.Texture = 'rbxassetid'..3372561114

But that errors, because the id belongs to a decal, not an image. How do I get the id for the image?

EDIT: Here's a list so far of things people think work, but they don't. First, a list of things that don't work, but that people think might work:

InsertService:LoadAsset(assetid) -- Only works for Decals owned by the place creator
MarketplaceService:GetProductInfo(assetid).AssetId -- ...that's just the id you put into the function.
HttpService:GetAsync('http://www.roblox.com/asset/?id='..assetid) -- Roblox changed how they store asset info, so this doesn't work anymore
assetid = assetid - 1 -- Again, Roblox changed how they store assets & assign ids, so this doesn't work
-- This web API: https://devforum.roblox.com/t/get-imageid-from-decalid-in-game/205561 -- Doesn't work since it relies on the old method of asset storage
-- Web API from the F3X Building Tools also relies on the old method and doesn't work for new decals

2 answers

Log in to vote
0
Answered by 4 years ago

Try going to the website, go to the search bar, put -1 on the decal id until you get a image. Or you could just get Roblox+.

0
That doesn't work for recently-uploaded decals, because Roblox changed how they assign asset ids. And I need to do this from a script inside a game, so accessing Roblox+ isn't an option. ThatChristianGuy 27 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

If you put it into a decal, it will change the id to the image, allowing you to then copy it.

0
OHHHH, It did work, thank you :DD Mestik78 0 — 3y

Answer this question