This is that whole part of the script. Can you spot the error or is it Roblox bug?
local Icon do
local iconMap = MAP_ID
game:GetService('ContentProvider'):PreloadAsync({iconMap})
local iconDehash do
-- 14 x 14, 0-based input, 0-based output
local f=math.floor
function iconDehash(h)
return f(h/14),f(h%14)
end
end
function Icon(IconFrame,index)
local row,col = iconDehash(index)
local mapSize = Vector2.new(256,256)
local pad,border = 2,1
local iconSize = 16
local class = 'Frame'
if type(IconFrame) == 'string' then
class = IconFrame
IconFrame = nil
end
if not IconFrame then
IconFrame = Create(class,{
Name = "Icon";
BackgroundTransparency = 1;
ClipsDescendants = true;
Create('ImageLabel',{
Name = "IconMap";
Active = false;
BackgroundTransparency = 1;
Image = iconMap;
Size = UDim2.new(mapSize.x/iconSize,0,mapSize.y/iconSize,0);
});
})
end
IconFrame.IconMap.Position = UDim2.new(-col - (pad*(col+1) + border)/iconSize,0,-row - (pad*(row+1) + border)/iconSize,0)
return IconFrame
end
end
I mean can you use a breakpoint and check the code line by line. You will find out the error with that more easily, just say’n. If you never heard of breakpoint the thread about it is here.
I mean it would be ironically that for someone else the same code is working and for you doesn’t. The programming is not an coincidence. There can be literally many reasons why it doesn’t work for you. Maybe you are just importing decal incorrectly then. So I’d use a breakpoint at this situation. I hope this helps.
I mean many times this happens when you are not the owner of the game on team create or you are not the person that uploaded this decal/image. Do you have API turned ON?