this code is suppose to get the menu out after the warning disapear, however the menu just overlays the warning.What am I doing wrong
local menu = script.Parent
-- Access the UI from the Player's screen, not StarterGui
local player = game.Players.LocalPlayer
local frame = player:WaitForChild("PlayerGui"):WaitForChild("warning")
menu.Transparency = 1 -- Use BackgroundTransparency for UI lies
local TweenService = game:GetService("TweenService")
local tInfo = TweenInfo.new(2)
local menuFadeOut = TweenService:Create(menu, tInfo, {Transparency = 0})
if frame.Enabled = true then
menu.Transparency = 1
else
menuFadeOut:Play()
end