Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I load three GUIs one at a time, and fix camera not wanting to be scriptable?

Asked by 3 years ago

What I'm after is when you first load into the game a GUI will come up that stats that it's in BETA testing once they click I agree the GUI will disappear and go to another GUI that's the startmenu, once they click "Play Chapter One" it'll open a new GUI that gives some backstory on the game and then click the imagebutton and it'll return to the character.

game.StarterGui.MainMenu.Frame.Visible = true

local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local mouse = player:GetMouse()
local camera =  game.Workspace.CurrentCamera
local defaultCFrame = camera.CFrame
local view = 150

function updateCamera()
    camera.CFrame = game.Workspace.CameraPart.CFrame
end
wait(0.1)
game.Workspace.CameraPart.Sound.Playing = true

game:GetService("RunService").RenderStepped:Connect(updateCamera)

script.Parent.Frame.Play.MouseButton1Click:Connect(function()
    wait(0.2)
    camera.CameraType = Enum.CameraType.Custom
    script.Parent.Frame:Destroy()
    game.Workspace.MenuCamera.Sound.Playing = false
    script:Destroy()
end)

game.StarterGui.NoteFromJoey:Destroy()

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent:Destroy()
end)

game.StarterGui.NoteFromJoey.Frame.Visible = true
script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent:Destroy()
end)

These are all the scripts I have, I don't exactly know how to go about making them load one at a time, I'm also having trouble with the camera not wanting to be scriptable.

Answer this question