I'm finishing up a plugin that has the option to create decals, but in order to stop errors, I want to make sure that the asset being loaded IS an image. Are there any methods of doing this?
✓ ANSWER ACCEPTED
Is there a method of taking an AssetID and determining if it is an image, and loadable?
1 answer
✓ Accepted answer
LoadAsset may be the solution to that. Check if the loaded asset IsA decal, and then make sure that you use pcall just in case.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
something along the line of: if game:GetService("InsertService"):LoadAsset(Img):IsA("Decal") then ?
Using this code:
if game:GetService("InsertService"):LoadAsset(Img):IsA("Decal") then print("all cool") Tex.Image = AID.. Img else print("Wtf u doing fam, not an image. Its a "..game:GetService("InsertService"):LoadAsset(Img).ClassName) end