This is my first time making a Intro UI. What did I do wrong
--//FederalJustice\\--
-----------------
--//Variables\\--
-----------------
local Logo = script.Parent.Logo
local Credit = script.Parent.Credit
---------------------
--//Main Function\\--
---------------------
game.Players.PlayerAdded:connect(function()
Credit:TweenPosition(UDim2.new(0.5, -200, 0.5, 100), 'Out', 'Quad', 2)
wait(2)
Fade()
end)
-------------------------------------
--//Upcoming Logo Fading Function\\--
-------------------------------------
function Fade()
Logo.ImageTransparency = 1
wait(0.1)
Logo.ImageTransparency = 0.9
wait(0.1)
Logo.ImageTransparency = 0.8
wait(0.1)
Logo.ImageTransparency = 0.7
wait(0.1)
Logo.ImageTransparency = 0.6
wait(0.1)
Logo.ImageTransparency = 0.5
wait(0.1)
Logo.ImageTransparency = 0.4
wait(0.1)
Logo.ImageTransparency = 0.3
wait(0.1)
Logo.ImageTransparency = 0.2
wait(0.1)
Logo.ImageTransparency = 0.1
wait(0.1)
Logo.ImageTransparency = 0
end
if Logo.ImageTransparency == 0 and Credit.Position == UDim2.new(0.5, -200, 0.5, 100)then
script.Parent.Visible = false
wait(1)
script:Destroy()
end

2 comments
First, do you know how to use for loops?
Yes