rytansall
(rytansal)
October 22, 2025, 11:29pm
1
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
rytansall
(rytansal)
October 23, 2025, 12:01am
3
i was trying that except it does the same thing
well, load the image before clicking
rytansall
(rytansal)
October 23, 2025, 12:04am
5
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"
rytansall
(rytansal)
October 23, 2025, 12:20am
8
now for some reason it doesnt work