Alright, so I noticed pretty quickly that the loop I hastily wrote wasn’t functioning as expected and was quite literally making a mistake immediately. However, after I swapped out the code for something that I knew worked, I also noticed that using the ImageLabel’s TweenPosition function was not firing each time, which led to random points where both Image’s would stop moving.
local TweenService = game:GetService("TweenService")
local FirstImage = script.Parent:FindFirstChild("First")
local SecondImage = script.Parent:FindFirstChild("Second")
while true do
TweenService:Create(FirstImage, TweenInfo.new(4, Enum.EasingStyle.Linear),
{Position = UDim2.new(1, 0, 0, 0)}):Play()
TweenService:Create(SecondImage, TweenInfo.new(4, Enum.EasingStyle.Linear),
{Position = UDim2.new(0, 0, 0, 0)}):Play()
wait(4)
FirstImage.Position = UDim2.new(-1, 0, 0, 0)
TweenService:Create(FirstImage, TweenInfo.new(4, Enum.EasingStyle.Linear),
{Position = UDim2.new(0, 0, 0, 0)}):Play()
TweenService:Create(SecondImage, TweenInfo.new(4, Enum.EasingStyle.Linear),
{Position = UDim2.new(1, 0, 0, 0)}):Play()
wait(4)
SecondImage.Position = UDim2.new(-1, 0, 0, 0)
end
This should be correct. Make sure that First starts at position (0, 0, 0, 0), Second starts at position (-1, 0, 0, 0).