Non-sequential Asset ID Generation Coming Soon

When I implemented this function and tested it out, it output the wrong asset id endpoint. It was a decal asset id I copied from the creator page and I made sure the decal was public as well. It gave me the rbxassetid format when it should be the roblox.com one. Any ideas on why this is?

Here is the link, as it was just a random image I tested: https://create.roblox.com/store/asset/16263011062/ImagesEpic-Duck

The way the code works is to assume that a failure to insert means that it was already an image and not a decal. However, technically there are some other rare backend failures which could happen. If you care about fixing the last 0.1% or whatever edge case you could attempt to parse the error message and determine what the error is (4xx error vs 5xx error), but the error messages aren’t guaranteed to stay the same so that would require more maintenance of the code.

TL;DR: You probably got very unlucky and there was a backend failure on that particular request.

Turns out I did not read far enough and it doesn’t work on the client…

Ah, yeah, it probably would have been good to put a check in the sample code that it’s being run on the server to avoid confusion because the pcall will mask the error if you do it on the client.

why

just why

this is a weird change

1 Like