Weird Issue with UI Tween transition

Hello everyone. So I’m trying to make a UI script where when you hit play it teleports you it then shows pictures and text. Anyways the goal is for when the images/text start is for them to change every for seconds. Anyways what I did was make a table of image IDs and quotes I wanna use. The quotes work but for some reason the images after going twice stop working and constantly loop. In the output, though it says that the images are changing but they are not in the game.
Video

As you can see what happens is the 2nd image seems to be repeating but in the output, it says that the image is changing. What I want is for the image to change.
Main Script
‘’'local Success, Error = pcall(function()
TeleportToGame(5306460540)
end)

repeat
	FT = FT + 1
	wait(5)
	Success,	Error = pcall(function()
		TeleportToGame(5306460540)
	end)
	
until Success or FT == 1

if FT == 5 then
	Players.LocalPlayer:Kick("Error Joining Game Please Retry")
elseif FT ~= 5 and Success then
	warn("YES!")
end

local Images = {5366326287, 5366333115, 5366330042, 5334582098, 5340300954, 5325773937}
local Quotes = {"So if you see the output the images are 'working'", "Thanks for the help", "Have a good day", "Minecraft or Roblox?"}

Background1Popin:Play()
Text1In:Play()
Text2In:Play()

local QuoteLoop = coroutine.wrap(function()
	while true do
	for i,v in ipairs(Quotes) do
			wait(4)
			Text2.Text = v
			print(v)
		end
	end
end)()
local PicLoop = coroutine.wrap(function()
	while true do
		for i,v in ipairs(Images) do
			SlowRepeat:Play()
			if Background1.ImageTransparency == 0.5 then
				Background2.Image = "rbxassetid://"..v
			elseif Background2.ImageTransparency == 0.5 then
				Background1.Image = "rbxassetid://"..v
			end
			wait(5)
			GamePopup.Position = UDim2.new(0.55, 0, 0.5, 0)
			if Background1.ImageTransparency == 0.5 then
				Background2Popin:Play()
				Background1Popout:Play()
				wait(0.3)
			elseif Background2.ImageTransparency == 0.5 then
				Background1Popin:Play()
				Background2Popout:Play()
				wait(0.3)
			end
			print(v)
		end
		end

end)()end)

Tweens, Services and Variables

local Tween = game:GetService("TweenService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")

--Variables
local Sidebar = game.Players.LocalPlayer.PlayerGui.Menu.Sidebar
local PLAYBTN = Sidebar:WaitForChild("Play")
local Credits = Sidebar:WaitForChild("Credits")
local Title = Sidebar:WaitForChild("Title")
--Tweens USED NOT FOR BUTTON
local GamePopin = Tween:Create(GamePopup, TweenInfo.new(0.3, Enum.EasingStyle.Sine),{Transparency = 0})

local Background1Popin = Tween:Create(Background1, TweenInfo.new(0.3),{ImageTransparency = 0.5})
local Background1Popout = Tween:Create(Background1, TweenInfo.new(0.3),{ImageTransparency = 1})
local Background2Popin = Tween:Create(Background2, TweenInfo.new(0.3),{ImageTransparency = 0.5})
local Background2Popout = Tween:Create(Background1, TweenInfo.new(0.3),{ImageTransparency = 1})

local Text1In = Tween:Create(Text1, TweenInfo.new(0.3), {TextTransparency = 0})
local Text2In = Tween:Create(Text2, TweenInfo.new(0.3), {TextTransparency = 0})

local SlowRepeat = Tween:Create(GamePopup, TweenInfo.new(5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.45, 0, 0.5, 0)}

Explore:
![Untitled|304x233](upload://rFAPep6gejuT0qbe4PkfJeEqUM3.png) 

Thanks for the help. :smiley:
1 Like

Try play testing then click on your player, then opening your player’s GUI and seeing if the id on the imagelabel actually changes, if it does, see if you’re tweening correctly, if it doesn’t, check if you’re actually setting the IDs.

If you haven’t already, try looking at the open source and comparing it to your code :ok_hand:

1 Like

OMG NOOB. :smiley:
I absolutely loved your UI tutorial and I love your channel. My scripting and UI skills have gotten a lot better thanks to your videos.
But anyways I did what you said and it turns out Background1 is changing but Background2 is not how would I fix it though? I’m pretty sure my tweens work good but what do you mean if I’m “Setting the ID’s”

Thanks

1 Like

Thanks :wink:

On image labels/anything that includes images/asset things, you can find a part where it shows the “ID” if the image. See if that changes according to what it is printing. If the ID stays the same, there may be an issue with how you’re setting the ID.

Background 1 should change, then background 2 changes, and then it tweens transparency fading into background 2, then vice versa.

If you need to as well, check the open source here and compare with your code to see if you can point out any issues:

1 Like

Thanks so much. I was able to fix it. It turns out my image ID was not properly set and thanks to your open-source place and tutorial I was able to make corrections. :smiley:

Thanks, Aura.

1 Like