Hi all!
I’ve been trying to write a script recently that transitions between images on a loading screen. The loading component is on a separate LocalScript. This script is only meant to transition between images.
It worked fine up until I added a tween to darken the ImageLabel every time it transitions between images. I’ve tried contacting friends however I can’t seem to figure out what the issue is.
Here’s the code:
local IDs = {
"rbxassetid://7058186650",
"rbxassetid://7057536468",
"rbxassetid://7057551361",
"rbxassetid://7057554241",
"rbxassetid://7057557386",
"rbxassetid://7057559737",
}
local tweenService = game:GetService("TweenService")
local background = script.Parent
local tweenInfor = TweenInfo.new(3.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, true, 0 )
local imageclosecolor = {ImageColor3 = Color3.new(0,0,0)}
local imageclose = tweenService:Create(background, tweenInfor, imageclosecolor)
local currentImage = 1
while true do
if currentImage > 6 then
currentImage = 1
end
script.Parent.Image = IDs[currentImage]
currentImage = currentImage + 1
wait(7)
imageclose:Play()
wait(3.2)
end
Additionally here’s a video; (uploaded to streamable because the file is too big - I think it should embed?)