Still have questions? Join our Discord server and get real time help.
Log in to vote

ImageLabel scripting vs manual input question?

Asked by 7 months ago

I was trying to make a script

function makeElement(imgID)
    image ="ImageLabel")
    image.Image = "rbxassetid://".."73737627"
    image.BackgroundTransparency = .5
    image.Parent = shop

But it keeps saying that the request failed. I inputted the same ID into an ImageLabel that I created manually and it had no problems. Why is this and how do I fix my script?

I did not publish the place I was working on if that is useful info

I don't think an asset with such an ID exists. T0XN 275 — 7mo
Mind pasting in the exact error you get in the output window? T0XN 275 — 7mo
It's the Outrageous Sword Pack that shows up when you look at the Decal Library. For some reason the Toolbox ID and the website URL ID are different fa_QURobloxXD 29 — 7mo

1 answer

Log in to vote
Answered by
Nonaz_jr 404 Moderation Voter
7 months ago

Look in toolbox under 'my decals', put the decal somewhere and look at it's properties. Take the asset id number from there, and put it in your code.

When you manually put in the catalog id from the website, it will automatically convert it to the right asset id. however, when you do it by script during the running game, this does not apply. Hence you need to give it the right number, the asset id you find when you make the decal.


Answer this question