Hello. I’m trying to make this image label where it randomly changes airline logos.
The problem is that it only works once and the loop stops there. It didn’t work in the local script so I just placed it in a regular script in ServerScriptService. This is what’s applied:
local images = {"rbxassetid://9582458948", "rbxassetid://9582501825", "rbxassetid://9582543033"}
local image = images[math.random(1, #images)]
local success, errormessage = pcall(function()
while wait(2) do
script.Parent.ImageLabel.Image = image
end
end)
if success then
print("Image change successful!")
else
print("Unable to change image.")
warn(errormessage)
end
Now I added the protected call to see if the script was really working. In case you can fix this, I’ll be very appreciated for that.