iHoppier
(GIS_Benny)
May 7, 2021, 10:25pm
#1
The Video:
This is my current code:
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
0.5, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out -- EasingDirection
)
function FadingInOne()
local Goal = {}
Goal.ImageTransparency = 1
local Tweening = TweenService:Create(
script.Parent.Image,
tweenInfo,
Goal
)
Tweening:Play()
end
function FadingOutOne()
local Goal = {}
Goal.ImageTransparency = 0
local Tweening = TweenService:Create(
script.Parent.Image,
tweenInfo,
Goal
)
Tweening:Play()
end
while true do
local RandomImage = ImageIds[math.random(1, #ImageIds)]
FadingInOne()
wait(0)
script.Parent:WaitForChild("Image").Image = "rbxassetid://" .. RandomImage
FadingOutOne()
script.Parent:WaitForChild("Image").Image = "rbxassetid://" .. RandomImage
wait(6)
end
koziahss
(Agent_Invalid)
May 7, 2021, 11:24pm
#2
I can’t see the code properly
Please could you use ``` to open and close so we can see?
iHoppier
(GIS_Benny)
May 7, 2021, 11:29pm
#3
Sure thing! Sorry about that. Let me fix it real quick.
EDIT: I’ve fixed it.
koziahss
(Agent_Invalid)
May 7, 2021, 11:32pm
#4
Hmm, in the video you posted I can’t really see a transition.
It might be the fact that you set your transition time very small
I think you need to change the time to make it longer also set easing style to something else maybe like circle or cubic and change the easing direction. it go InOut instead of out.
iHoppier
(GIS_Benny)
May 7, 2021, 11:45pm
#5
External Media
Here’s a example of wanting a smooth loading screen where the image transitions.
koziahss
(Agent_Invalid)
May 7, 2021, 11:50pm
#6
Maybe you want to wait for when the tween finishes?
Tweening.Completed:Wait()