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

How to change a decal's id?

Hello. I am trying to make a custom image. So the user can provide an image id. And I can show it.

But the request keeps failing, can someone provide a better method?

I basically try to do this.

Img.Image = "rbxassetid://"..Arguments[2]

Arguments[2] is an image id. (String) Img is a decal.

2 answers

✓ Accepted answer

Odds are the image ID you're supplying is the ID that references the image, but not the ID of the image itself. I'll explain if you're confused with what I'm talking about.

If you go to the page for an image in, say, your inventory or the asset library, it will take you to the reference page. There is an icon next to the title of the image that takes you to the actual image page. The actual image page holds the actual image ID. The reference page holds the ID of the generic asset, which references the image but is not the image itself. ImageObject.Image requires the actual image ID in order to load that image.

Instead of rbxassetid:// you can use

rbxthumb://type=Asset&id=&w=420&h=420

so it should be

Img.Image = "rbxthumb://type=Asset&id="..Arguments[2].."&w=420&h=420"

1 comment

0

That wouldn't work. It would still be the same either way.

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