Decals not loading in?

Hello,

I’ve been trying for a while now to use a script to change decal textures, but every time I try, it says Image failed to load in: Request failed straight away, apart from faces. If I do faces it works fine, but images won’t work at all. Any reason for this?

The line is:

script.Parent.Parent.Main.Decal.Texture = "http://www.roblox.com/asset/?id="..id

Yes, id is a string with an id that’s valid as faces work fine.

6 Likes

Most of the times, the asset ID is not corresponding to the library ID, which is a bummer. Set that ID in manually and you get something else.

1 Like

Yes, but the user has to input an id on a gui.

Try using rbxassetid://idnumber. I’m not sure if this works so I am currently double checking it.

I just tried that, didn’t seem to work at all.

I went to experiment a little and the results didn’t look any better:

print(game.InsertService:LoadAsset(id):FindFirstChildOfClass("Decal").Texture)

The ID subtraction is unpredictable, you should utilize the InsertService to identify the right ID from the decal object loaded in the game.

I tried using InsertService and it said Bad Request.

Oops! I just noticed that it only works on decals in inventory. This is extremely inconvenient. Worst case scenario now is to subtract the entered ID and test if it’s a decal(that will run a lot of web calls).

Christ, is it really not working any other way.

I guess you could try:

“rbxassetid://”

instead of:

http://www.roblox.com/asset/?id=

If you have seen the Roblox’s grafitti tool, the tool used to work until some time after the decals upload grew faster. Currently, it is complicated to achieve the right decal without using the wrong IDs.

2 Likes

When you put in the id, you’d probably get it from the library on the web. But for some reason roblox doesn’t use that id, they got another server with other ids.

So to fix this, make sure to take the id from the toolbox and paste it into it and see if it changes decal.

:slightly_smiling_face:

Yeah, these are id’s from the ROBLOX library/toolbox.

So did it work?

If it did then flag it as solution, since other people might want to know how to fix this.

I got a question, what’s difference between findfirstchildwhichisa() with findfirstchildofclass? :thinking:

If you use FindFirstChildOfClass, it is explicitly just that class, while FindFirstChildWhichIsA is for all of its sub-classes.

No, all id’s I’ve put in have been ROBLOX toolbox/library id’s.

1 Like

I would do what the Roblox Spray tool does (as explained by @Operatik).

I’ll give this a try now, hopefully it will work.

I don’t get, what would be Sub-class? :thinking: