Imagelabel first popping up as white then showing the Image

I made a script where if you press the textbutton, the imagelabel on the frame will turn to the desired image. For some reason it turns white then to the image. Is this fixable?

local frame = script.Parent.Parent.Parent:FindFirstChild("b")
local map = frame:GetAttribute("map")





script.Parent.MouseButton1Click:Connect(function()
	frame.Visible = true
	script.Parent["clickfast.wav"]:Play()
	frame:FindFirstChild("a").Text = "Bird Factory"
	frame:FindFirstChild("b"):FindFirstChild("thumbnailimage").Image = "rbxassetid://130026299164859"
	frame:SetAttribute("map", "BirdFactory")
end)
1 Like

preload the image using content provider

i was trying that except it does the same thing

well, load the image before clicking

like this?

local frame = script.Parent.Parent.Parent:FindFirstChild("b")
local map = frame:GetAttribute("map")
local array = {frame:FindFirstChild("b"):FindFirstChild("thumbnailimage").Image}
local c = game.ContentProvider



c:PreloadAsync(array)





script.Parent.MouseButton1Click:Connect(function()
	frame.Visible = true
	script.Parent["clickfast.wav"]:Play()
	frame:FindFirstChild("a").Text = "Bird Factory"
	frame:FindFirstChild("b"):FindFirstChild("thumbnailimage").Image = "rbxassetid://130026299164859"
	frame:SetAttribute("map", "BirdFactory")
end)

no because you’re setting the image when the button gets clicked, before that theres no image, just preload "rbxassetid://130026299164859"

now for some reason it doesnt work :confused: