So I am trying to make a game with lots of decals in them that are set by a script automatically. The script inserts the website id. For example, if I wanted Howard the Alien, I would do 3475568228. The problem is when I try to insert the full link http://www.roblox.com/asset/?id=3475568228, this does not work. I have to insert 3475568228 into a decal, which gives me the id 3475568211, and then put that into the module. The thing is, I don’t want to do this for every single decal. Is there a simple version to do this.
Yes, use the rbxthumb ContentId with the decal id. It will automatically parse the given link and return the appropriate image. You won’t need to do any subtraction magic to get from a decal id to an image id, it’ll be handled for you. Just link up the decal id to rbxthumb and you’ll get the image.
How would I use this with a decal?
Read both my post and the thread for more information as everything is explained there. You just attach the decal id to the rbxthumb ContentId format and then make any additional specifications you want. For example, a decal would be rbxthumb://type=Asset&id=DECAL_ID&w=420&h=420
. Obviously replace DECAL_ID with your decal id then put it in the Image field or wherever you need it.
This fixed it for a while, but after inserting new ids, it stopped working? I there a reason why it did this?
You may want to check that you aren’t using a malformed URL. Are you able to provide examples of rbxthumb content that work and do not work for you?
Example 3473416294, url I am using: “rbxthumb://type=Asset&id=”… 3473416294 …“&w=420&h=420”
rbxthumb://type=Asset&id=3473416294&w=420&h=420
Do you receive anything in your console when the image doesn’t work for you?
I am not receiving anything in the console.
It just suddenly started working, thank you for your help!