Couldn't load images into an imagelabel, appears blank?

Hello,

I am trying to load an imagelabel by a local script. It only appears white.

local map1 = {
"mapname",
"creator",
"1234567890", --image id
}

maps.O1.Image = tonumber(map1[3]) -- my first attempt
maps.O1.Image = "rbxassetid://"..map1[3] -- second
maps.O1.Image = "https://www.roblox.com/library/"..map1[3] -- third
maps.O1.Image = "http://www.roblox.com/asset/?id="..map1[3] -- fourth attempt

For some reason, none of these worked. They looked like this:

What I wanted:

Any solutions? :smiling_face_with_tear:

make sure for the image over top to make it have background transparency to 1

1 Like

I have, it still doesn’t load the images unfortunately. Any other solutions?

I just used your second attempt, and it worked just fine.
Make sure that the ImageLabel is Visible and ImageTransparency is 0.
On top of that, make sure you copied the ID correctly, and that the client is actually getting the event or whatever to set the image.

And this is just a suggestion, but maybe (For making the script neater)
Instead of doing

Map1 = {
'map name';
'mapper';
'0';
}
Map2 = {
'map name';
'mapper';
'1';
}

Do this instead:

local Maps = {
Map1 = {
'map name';
'mapper';
'0';
};
Map2 = {
'map name';
'mapper';
'1';
};
}

Maps['Map1'][1] -- This would load Map1's Map Name, and would make adding new maps extremely easy.
-- You could just replace 'Map1' with the name of the map you desire.
--If youre using a remote event to send over the map information and names, just do Maps[MapName][1]
2 Likes

The second attempt definitely worked, I found out that my problem was that the image that I was using was owned by another group. When I replaced it with an asset that is owned by the group, it started to work.

The game I was working on was a group game, so I’m not sure if this only happens to group-owned games.

Thank you
Also nice example image :joy: :joy: