Decals not loading images

Images failing to load can caused by the following:

  • The image was moderated
  • Roblox http requests are down (which is usually unlikely to happen)

Edit:
Can you add a print to the server script to make sure that you are loading the correct image ID or if there is actually an image ID getting sent to the server.

1 Like

As I have said. I have the correct IDs, but they won’t load.

I also, have already tried printing, and the image was a test image from the top page on Decals in developer. Also, I have been working on this for a while (2 - 3 days).

Post the IDs? That’s probably where the issue is, your script looks fine.

73737627 https://www.roblox.com/library/73737627/Outrageous-Sword-Pack
112902315 https://www.roblox.com/library/112902315/cat-ears

You have to use the image’s ID itself, not the decal’s ID. If you paste the raw ID into a decal’s texture in studio, you’ll see it changes. To do this in a script, you can do this:

https://devforum.roblox.com/t/how-does-studio-find-the-asset-id-of-a-decal-id/51854/2

There might be a better method with MarketplaceService, but this is the one I know of.

1 Like

You appear to be using the site IDs. These are not the same as AssetIds. You need to use the AssetId of a decal if you wish for it to render in-game.
Another way of obtaining it, is pasting the site ID of the decal in question and putting it in the Texture property of an unused/unrendered Decal, and copying the new ID it gives you.

No, I need this to be able to be changed in game.

Then you need the assetIDs of all the decals that are to be changed to in the game.
Of which again you can retrieve by using GetProductInfo.

1 Like

This won’t work because I can’t predict what the players will input.

1 Like

You need asset IDs you have image IDS, you can run a simple script using GetProductInfo to get the asset ids from the images.

Try:

local myimage = 73737627

function imagetoasset(image)
     info = game:GetService("MarketplaceService"):GetProductInfo(image, Enum.InfoType.Asset)
     return info.AssetId
end

print(imagetoasset(myimage))
1 Like

There’s a reason why some players have a smooth gaming experience and some don’t. Assets are loaded into the client, if your internet is slow, the request may fail.

Images that are not for sale and are not yours cannot be used by you and other people other besides the owner.

1 Like

Yes, but assets are requested first on the Server then loaded on the Client. There could be loading delay, on the Client, but the assets are already requested and loaded on the server. If the server has trouble requesting an asset, it will throw an error, this has nothing to do with the client. The server doesn’t throwback errors when the client can’t load an asset, because its already loaded on the server.

I never knew this, testing this right now.

Edit: With my findings, it is still possible to use assets that you do not own or that are on sale.


Alt account in the default place using an asset that it doesn’t own or is on sale

A roblox upload of a stock image of the egg hunt as an example

Are you sure about this? I’m pretty sure the client’s output will thorw an error if the client can’t load a certain image, not the server (for different image ids)

Hmm, I will into this. Last time I checked, it was not possible.

Edit:
I stand corrected. I should have used a proper setup when testing. You can definitely use images that are not for sale and not yours.

1 Like

The client will throw out a timing out error, but the asset can still be loaded on the server.

1 Like

This defeats the purpose of copy permission though. Is it possible that the image loads in studio, but not in live games?

2 Likes

This does indeed work for live games.

1 Like

It still does the same thing, and outputs the same thing.

That’s because the AssetId key/field of the table value returned by GetProductInfo() matches the ID that was passed as an argument to it. You need to iterate over the catalog IDs behind the requested decal ID in order to retrieve its corresponding image ID.

2 Likes

Right, I made my own version of this, yet it led to other errors such as “Too many requests (HTTP 429)”
Is there a way I could fix that?