Hey,
I'm having trouble with Inserting an Image into a ImageLabel via. a LocalScript
Here is my Code:
local Item1 = script.Parent.Parent.List["1Item"] game.ReplicatedStorage.FoodClickHandler.OnClientEvent:Connect(function(Food, ImageId) Item1.Image = "http://www.roblox.com/asset/?id="..ImageId end)
The ImageId is the following: 720401998
If the Local Script runs the Image changes to a transparent background!
I hope somebody can help me
EDIT There is a Error in the console:
Image "https://assetdelivery.roblox.com/v1/asset?id=720401998" failed to load in "Players.RedstonecraftHD.PlayerGui.FoodGui.List.1Item.Image": Request failed
Instead of doing
Item1.Image = "http://www.roblox.com/asset/?id="..ImageId
I would simply suggest that you would do
Item1.Image = "rbxassetid://" .. ImageId
The reason for this is that images do not render if you provide a URL from the Roblox website.
There is a special URL, rbxassetid://
that you will have to use for it to render.
If you would put an ordinary URL, the image would not load and it would turn into the transparent background you were talking about.
I hope you would find this as a solution.