Hello,
So I just got done making an intro for my game and there’s fade in and out effect between every image label. The thing is that it fades a bit too slow and there’s some parts where I want to go faster and others slower. I got this code from a scripting tutorial and they didn’t explain very well. I was wondering what from this code can be adjusted for that?
Code:
local TweenService = game:GetService("TweenService")
local Player = game.Players.LocalPlayer
local RemoteEvent = game.ReplicatedStorage.IntroEvent
local intromusic = game.Workspace:FindFirstChild("intromusic")
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local logo = Frame:WaitForChild("logo")
local presents = Frame:WaitForChild("presents")
local zailpark = Frame:WaitForChild("zailpark")
local warning = Frame:WaitForChild("warning")
local headphones = Frame:WaitForChild("headphones")
Frame.BackgroundTransparency = 0
local FrameInvisible = {}
local LogoVisible = {}
local LogoInvisible = {}
local PresentsVisible = {}
local PresentsInvisible = {}
local ZailParkVisible = {}
local ZailParkInvisible = {}
local WarningVisible = {}
local WarningInvisible = {}
local HeadphonesVisible = {}
local HeadphonesInvisible = {}
FrameInvisible.BackgroundTransparency = 1
LogoVisible.ImageTransparency = 0
LogoInvisible.ImageTransparency = 1
PresentsVisible.ImageTransparency = 0
PresentsInvisible.ImageTransparency = 1
ZailParkVisible.ImageTransparency = 0
ZailParkInvisible.ImageTransparency = 1
WarningVisible.ImageTransparency = 0
WarningInvisible.ImageTransparency = 1
HeadphonesVisible.ImageTransparency = 0
HeadphonesInvisible.ImageTransparency = 1
local Info = TweenInfo.new(1)
local TweenFrameInvisible = TweenService:Create(Frame,Info,FrameInvisible)
local TweenLogoVisible = TweenService:Create(logo,Info,LogoVisible)
local TweenLogoInvisible = TweenService:Create(logo,Info,LogoInvisible)
local TweenPresentsVisible = TweenService:Create(presents,Info,PresentsVisible)
local TweenPresentsInvisible = TweenService:Create(presents,Info,PresentsInvisible)
local TweenZailParkVisible = TweenService:Create(zailpark,Info,ZailParkVisible)
local TweenZailParkInvisible = TweenService:Create(zailpark,Info,ZailParkInvisible)
local TweenWarningVisible = TweenService:Create(warning,Info,WarningVisible)
local TweenWarningInvisible = TweenService:Create(warning,Info,WarningInvisible)
local TweenHeadphonesVisible = TweenService:Create(headphones,Info,HeadphonesVisible)
local TweenHeadphonesInvisible = TweenService:Create(headphones,Info,HeadphonesInvisible)
RemoteEvent.OnClientEvent:Connect(function()
wait(6)
TweenLogoVisible:Play()
intromusic:Play()
wait(5)
TweenLogoInvisible:Play()
wait(0.2)
TweenPresentsVisible:Play()
wait(3)
TweenPresentsInvisible:Play()
wait(0.5)
TweenZailParkVisible:Play()
wait(5)
TweenZailParkInvisible:Play()
wait()
TweenWarningVisible:Play()
wait(5.5)
TweenWarningInvisible:Play()
wait()
TweenHeadphonesVisible:Play()
wait(6.5)
TweenHeadphonesInvisible:Play()
wait(9.44)
TweenFrameInvisible:Play()
script.Parent:Destroy()
end)
I’d greatly appreciate any help!