I'm trying to make the background of the gui keep transitioning from being visible to being transparent, this is what I have thought of so far.
BetaPassNeededGui = script.Parent
Up = false
BetaPassNeededGui.BackgroundTransparency = 0
while true do
print("Script Active")
wait()
while Up == true do
print("Mode = ".. Up)
while BetaPassNeededGui.BackgroundTransparency <= 1 do
BetaPassNeededGui.BackgroundTransparency = BetaPassNeededGui.BackgroundTransparency + 0.1
wait(0.1)
if BetaPassNeededGui.BackgroundTransparency == 1 then
Up = false
end
end
while Up == false do
print("Mode = ".. Up)
while BetaPassNeededGui.BackgroundTransparency >= 0 do
BetaPassNeededGui.BackgroundTransparency = BetaPassNeededGui.BackgroundTransparency - 0.1
wait(0.1)
if BetaPassNeededGui.BackgroundTransparency == 0 then
Up = true
end
end
end
end

1 comment
You are using quite a lot of while loops. Consider creating a function instead.