So i’ve been trying to update an Image ID through a for loop but unfortunately it’s not changing for some reason.
Could anyone help me? I’ve seen people using insertservice:Load() but it returns a model instead of directly returning the requested ImageID.
Can you please provide the code you are using?
Also, does the image change if you slow down the loop to be like 3 seconds per image?
Here is the script. I’ll also provide the Table with the image IDs. And no, i just tried and it doesn’t seem to be changing.
triggerSymbol1BindableEvent.Event:Connect(function(image)
print(image)
for i, v in pairs(listOfImgIds) do
--tprint(imgLabel)
image.Image = v
print(image.Image)
task.wait(.1)
end
end)
end)
The table containing the image IDs:
preloadedImages = {
"http://www.roblox.com/asset/?id=136767677595321",
"http://www.roblox.com/asset/?id=100572865780077",
"http://www.roblox.com/asset/?id=115856432727422",
"http://www.roblox.com/asset/?id=108928971113793",
"http://www.roblox.com/asset/?id=138802459621601",
"http://www.roblox.com/asset/?id=136217737710517",
"http://www.roblox.com/asset/?id=135741533667110",
"http://www.roblox.com/asset/?id=124812754422612",
"http://www.roblox.com/asset/?id=112482834887364",
"http://www.roblox.com/asset/?id=123891371982542",
"http://www.roblox.com/asset/?id=73663406748076",
"http://www.roblox.com/asset/?id=131503638560673",
"http://www.roblox.com/asset/?id=137982745094387",
"http://www.roblox.com/asset/?id=106297261824106",
"http://www.roblox.com/asset/?id=92747114498689",
"http://www.roblox.com/asset/?id=132008445261328",
"http://www.roblox.com/asset/?id=124512080018997",
"http://www.roblox.com/asset/?id=118025616757531",
"http://www.roblox.com/asset/?id=127819737035676",
"http://www.roblox.com/asset/?id=110249016973873",
"http://www.roblox.com/asset/?id=132352641768514",
"http://www.roblox.com/asset/?id=137038511395562",
"http://www.roblox.com/asset/?id=106672903873054",
"http://www.roblox.com/asset/?id=106748648847277",
"http://www.roblox.com/asset/?id=75985923847824",
"http://www.roblox.com/asset/?id=123989800972048",
"http://www.roblox.com/asset/?id=95496123194633",
"http://www.roblox.com/asset/?id=115264746590498",
"http://www.roblox.com/asset/?id=110474295320198",
"http://www.roblox.com/asset/?id=136008469918803",
"http://www.roblox.com/asset/?id=100922299320595",
""
}
is the print statement correctly outputting the image ID?
Here’s also what i use to preload the images.
if Status == Enum.AssetFetchStatus.Failure then
print("Failed to load", contentId .. "trying to reload..")
end
end
ContentProvider:PreloadAsync(preloadedImages, checkFailed)
communicatePreloadedImgEvent:Fire(preloadedImages)
Just to confirm, is image
actually the object you are observing? It has happened before where someone was confused why something wasn’t working, and it turned out they had the wrong thing visible
From what i’m seeing i’m not mistaking the object i’m observing.
local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if plr and not deb then
deb =true
blackScreen.Parent.Enabled =true
triggerSymbol1BindableEvent:Fire(BlackScreen.ImageLabel)
task.wait(5)
deb =false
end
end)
How is blackScreen
defined? Just want to double check everything cause it’s weird the images aren’t changing
Here how it’s being defined:
local blackScreen = plrGUI:WaitForChild("CutsceneBlackscreen").Frame
Im assuming plrGUI is something like game.Players.LocalPlayer.PlayerGUi
? (and not StarterGui).
If the address is correct, then Im not really sure why it wouldnt be working. I’m going to go to sleep now so ill just say briefly:
- You can try uploading a video and using that instead of a bunch of frames (although it costs robux)
- You can try creating 1 ImageLabel per ID, and just change which one is visible
- You can try changing the prefix of each ID to "rbxassetid:// instead of “http…/?id=”
I’ll try doing so, and get back to you. Thank you, may you sleep well.
Turns out for some reason i had the imageTransparency set to 1, after changing that and doing the 3rd method you’ve provided, it worked. Thank you very much!