This is my intro script, what it does is position the camera at a certain point. It then puts the first intro ("Intro") into the players current camera. All three intro objects are in starter gui.
After twenty seconds the first intro goes away, and IntroTwo is in the current camera now. However, if they the skip button it clears all the children in the camera. It then adds MenuCameraPosition to the camera.
The problem is that the second intro still appears when you press skip. What should I do to keep the other intro's from appearing if they press skip?
wait()
game.StarterGui:SetCoreGuiEnabled(0, false)
game.StarterGui:SetCoreGuiEnabled(2, false)
local Intro = script.Parent:WaitForChild("Intro"):Clone()
Intro.Parent = game.Workspace.CurrentCamera
wait(3)--Wait for the stuff to load
local cam = Workspace.CurrentCamera
cam.CameraType = "Scriptable"
cam.CoordinateFrame = CFrame.new(-74.77, 7.73, 107.733)
cam.Focus = CFrame.new(-73.888092, 8.4218502, 107.846222, 2, 0, 0, 0, 1, 0, 0, 0, 1)
-------------------------------------------
local IntroGui = script.Parent.IntroGui
local SkipButton = IntroGui.Content.Pages.Skip
local SadSong = IntroGui.SadSong
---------------------------
function OpenMenu()
for i = 0.5,0,-0.01 do
SadSong.Volume = i
wait()
end
wait()
cam:ClearAllChildren()
local a = script.Parent.MenuCameraPosition:Clone()
a.Parent = game.Workspace.CurrentCamera
IntroGui:Remove()
local Menu = script.Parent.Menu ---------
local Holder = Menu.Holder ---------VARIABLES----------
local PianoSound = Menu.PianoSound ---------
Menu.LocalScript.Disabled = false --Run Menu scripts
PianoSound:Play() --Play Music
Holder.Visible = true --Make Menu visible
script.Disabled = true
end
--------------------------
SkipButton.MouseButton1Down:connect(function()
OpenMenu() ---Closes Intro and opens Menu
end)
function IntroTwo()
Intro:Remove()
Intro2 = script.Parent.IntroTwo:Clone()
Intro2.Parent = game.Workspace.CurrentCamera
end
wait(20)
IntroTwo()
