Ad
Log in to vote
0

ImageLabel scripting vs manual input question?

Asked by 4 months ago

I was trying to make a script

function makeElement(imgID)
    image = Instance.new("ImageLabel")
    image.Image = "rbxassetid://".."73737627"
    image.BackgroundTransparency = .5
    image.Size =UDim2.new(imageproportion,0,imageproportion,0)
    image.Parent = shop
end

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

1
I don't think an asset with such an ID exists. T0XN 274 — 4mo
0
Mind pasting in the exact error you get in the output window? T0XN 274 — 4mo
0
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 — 4mo

1 answer

Log in to vote
1
Answered by
Nonaz_jr 404 Moderation Voter
4 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.

Ad

Answer this question