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:

Thanks for the help. :smiley: