Bird_7x
(XAML)
June 26, 2021, 6:04pm
#1
i have a ui that makes it so u can insert a code and it will put a decal on the wall.
right now it will only work for the id’s from studio, not the one from the website…
how can i make it so it can also use the id from the website since most people don’t have roblox studio to insert decals.
i have searched everywhere no posts helped me
Are the decals free to take? You’d obviously not be able to use ones that aren’t free.
Bird_7x
(XAML)
June 26, 2021, 6:15pm
#3
i just want something like how you can insert a id in bloxburg to set a picture frame or something
i dont know how that works but right now i can do it for any like image id but not asset id
literally the same thing but without the process of getting the asset id through studio
I’m still confused a bit, but basically you could just do:
local inputID = --//some ID supplied by the user
someDecal.Texture = "rbxassetid://"..inputID
Bird_7x
(XAML)
June 26, 2021, 6:32pm
#5
thats not what i want, i actually figured out what i need now.
to get the ImageId instead of the decal id
because roblox images have a id and then decals have an id.
i rather get the image id from a decal id. i dont know how to do that
What do you mean by image ID? Aren’t they the same as decal ID?
2 Likes
Honestly I have no idea what you mean
1 Like
Doqee
(Doqee)
June 26, 2021, 9:18pm
#8
Currently, it’s difficult to obtain the Image
ID from a Decal
ID, hence if you’d want to use InsertService
for converting the ID, the asset needs to be owned by you .
There’s a practical method you could try, and it is iterating (subtracting by 1 every time) the Decal
ID until they both match the creator
(using MarketPlaceService:GetProductInfo() ), as the Image
ID is always smaller. The results can be unstable, alongside the activity from the script.
Source of the practical method (suggested):
Massively support.
In Lua Learning, users can add images to their tutorials. They input an ID, and then my code has to go through a massive headache to actually display it.
My code first determines if it’s a decal or an image. If an image, give the user a trophy and a cookie for doing it so neatly and then display the image. But if it’s a decal, oh boy.
I have to iterate through IDs, slowly subtracting 1 and checking if that asset is an image, made by the same creator as the decal. If it is, …
There is a much simpler way using one of f3x’s endpoints:
cc @GooierApollo664
The domain for F3X’s asset extraction is https://f3xteam.com/bt/. There are specific endpoints for decals and meshes. Remember to wrap the calls with pcall, as is standard (or should be) when working with the HttpService.
To retrieve an image, you require getDecalImageID with the ID supplied. It returns a number in plain text, so you can return the response directly from the call and use it.
local image = HttpService:GetAsync("http://f3xteam.com/bt/getDecalImageID/decalID"…
colbert2677
(ImagineerColbert)
June 26, 2021, 10:32pm
#10
I don’t recommend this anymore. Check out rbxthumb .
2 Likes