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.
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.
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.
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?
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.
I’ll give this a try now, hopefully it will work.
I don’t get, what would be Sub-class?
Before we’re going off-topic here, a sub-class is a class of a superclass. One such instance of superclass is BasePart
, using Part
, Wedge
, etc. as sub-classes.
All of the current ideas above didn’t seem to work, I’ll keep trying though.
Request fail throws if you supply an invalid asset id through that link. Library ids are not the same as image ids, so you will have to find a method of converting that into the proper asset id.
You can use the rbxthumb ContentId to help in this process. This’ll fetch the thumbnail of the image without having to do any subtraction tricks. I do believe the thumbnail differs from the actual image asset though so you’ll need to figure that bit out on your own.
Texture = "rbxthumb://type=Asset&id=" .. id .. "&w=420&h=420"
That worked, thanks. I didn’t realise you have to put it like that.