I’m talking about using InsertService:LoadAsset on the ID given by the player, seeing if the returned asset has a Decal on it, if yes, the ID given is a Decal Id, grab the Image Id from it, if not, the Id is an Image one, use that one
I’ll admit, I probably should have tried this. I misinterpreted the “location” as solely being the image binary. Thank you, this works.
Would still like a more tact way of getting the image id though
This is how I’m currently doing it on my game:
local insertService = game:GetService("InsertService")
local id = 1234567890
local success, model = pcall(insertService.LoadAsset, insertService, id)
if success and model then
local decal = model:FindFirstChildOfClass("Decal")
if decal then
id = string.gsub(decal.Texture, "%D", "")
end
end
print(`rbxassetid://{id}`)
It seems to yield for about the same time it does when you use the ID on explorer and it auto-changes, you could probably cache it on the same server if anything to make it faster for same-ids
1 Like
I assume this is what is causing my issue(s) mentioned in this post?
Why does this script that gets place visits and favorites error? “HttpError: InvalidRedirect” - Help and Feedback / Scripting Support - Developer Forum | Roblox