Sorry for the bad code. I want to learn better, that's why I am posting this. THIS CODE WORKS! But, is there a proper way of doing it?
--//Variables
local Player = game.Players.LocalPlayer
local Play = script.Parent.Intro.Container.Play
local Loadout = script.Parent.Intro.Container.Loadout
local Settings = script.Parent.Intro.Container.Settings
repeat wait() until Player.Character
--// Fade Functions
function FadePlay()
for i = 1,.5,-.05 do
Play.BackgroundTransparency = i
wait(.001)
end
end
function FadeLoadout()
for i = 1,.5,-.05 do
Loadout.BackgroundTransparency = i
wait(.001)
end
end
function FadeSettings()
for i = 1,.5,-.05 do
Settings.BackgroundTransparency = i
wait(.001)
end
end
function UnFadePlay()
for i = .5,1,.05 do
Play.BackgroundTransparency = i
wait(.001)
end
end
function UnFadeLoadout()
for i = .5,1,.05 do
Loadout.BackgroundTransparency = i
wait(.001)
end
end
function UnFadeSettings()
for i = .5,1,.05 do
Settings.BackgroundTransparency = i
wait(.001)
end
end
--// Mouse Enter
Play.MouseEnter:connect(function()
FadePlay()
end)
Play.MouseLeave:connect(function()
UnFadePlay()
end)
Loadout.MouseEnter:connect(function()
FadeLoadout()
end)
Loadout.MouseLeave:connect(function()
UnFadeLoadout()
end)
Settings.MouseEnter:connect(function()
FadeSettings()
end)
Settings.MouseLeave:connect(function()
UnFadeSettings()
end)

1 comment
honestly thats the best way to do it. sometimes code just has to be long. I have a 46 line script just to calcuate the health of soemthing, destroy it if the health gets to low, and to display it to a gui. Sometimes its just unavoidable.