Need help with looped automatic panning images using tweens

I am confused about how to fix my code using tweenservice well it’s my first time using it so yeah…

So, my goal is to make infinite panning images in 1 frame, you know like an automatic panning effect of images in one place. but I’m confused so I can’t finish it.

This is my images inside of a frame:
image

This is the script that handles the panning images:

local TweenService = game:GetService("TweenService")

local image_1 = script.Parent:WaitForChild("ImageSplashFrame"):WaitForChild("ImageSplash-1")
local image_2 = script.Parent:WaitForChild("ImageSplashFrame"):WaitForChild("ImageSplash-2")
local image_3 = script.Parent:WaitForChild("ImageSplashFrame"):WaitForChild("ImageSplash-3")
local image_4 = script.Parent:WaitForChild("ImageSplashFrame"):WaitForChild("ImageSplash-4")
local image_5 = script.Parent:WaitForChild("ImageSplashFrame"):WaitForChild("ImageSplash-5")
--local imageFolder = script.Parent:WaitForChild("ImageSplashFrame"):GetChildren()


local TweenInformation = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, false, 0)

local min = 0.35

image_1.ImageTransparency = min
image_2.ImageTransparency = 1
image_3.ImageTransparency = 1
image_4.ImageTransparency = 1
image_5.ImageTransparency = 1



--FadeIn
local tweenIn1 = TweenService:Create(image_1, TweenInformation, {ImageTransparency = min})
local tweenIn2 = TweenService:Create(image_2, TweenInformation, {ImageTransparency = min})
local tweenIn3 = TweenService:Create(image_3, TweenInformation, {ImageTransparency = min})
local tweenIn4 = TweenService:Create(image_4, TweenInformation, {ImageTransparency = min})
local tweenIn5 = TweenService:Create(image_5, TweenInformation, {ImageTransparency = min})

--FadeOut
local tweenOut1 = TweenService:Create(image_1, TweenInformation, {ImageTransparency = 1})
local tweenOut2 = TweenService:Create(image_2, TweenInformation, {ImageTransparency = 1})
local tweenOut3 = TweenService:Create(image_3, TweenInformation, {ImageTransparency = 1})
local tweenOut4 = TweenService:Create(image_4, TweenInformation, {ImageTransparency = 1})
local tweenOut5 = TweenService:Create(image_5, TweenInformation, {ImageTransparency = 1})

local function getRandom()
		--wait(5)
	tweenOut1:Play()
	--wait(deb)
	tweenOut1:Cancel()
	
	--Img2 tween in
	tweenIn2:Play()
	--wait(deb)
	tweenIn2:Cancel()
	
	--Img2 tween out
	tweenOut2:Play()
	--wait(deb)
	tweenOut2:Cancel()
	
	--Img3 tween in
	tweenIn3:Play()
	--wait(deb)
	tweenIn3:Cancel()
	
	--Img3 tween out
	tweenOut3:Play()
	--wait(deb)
	tweenOut3:Cancel()
	
	--Img4 tween in
	tweenIn4:Play()
	--wait(deb)
	tweenIn4:Cancel()
	
	--Img4 tween out
	tweenOut4:Play()
	--wait(deb)
	tweenOut4:Cancel()
	
	--Img5 tween in
	tweenIn5:Play()
	--wait(deb)
	tweenIn5:Cancel()
	
	--Img5 tween out
	tweenOut5:Play()
	--wait(deb)
	tweenOut5:Cancel()

	--Img1 tween in
	tweenIn1:Play()
	--wait(deb)
	tweenIn1:Cancel()
end

getRandom()

I need the panning to be a loop so it will not stop panning.
Also if possible I want it to be random images.

I need this for my new game. thank you in advance!

Instead of waiting between tweens you could use the line

tween.Completed:Wait()

This will wait until the defined tween has completed before moving on to the next tween.

From your current code it appears that you are instantly cancelling the tweens playing therefore it goes through the list of tweens and doesn’t play any.

(This is not related to your answer)
Umm… why the tweening animation repeats when I don’t have any loop in the script?

Theres no loop in my script but the image flickers and the transparency came back to its original state.

tweenOut1:Play()
tweenOut1.Completed:Wait()
print("debug!")

EDIT: I fixed it now I just have looping on the TweenInfo.