Yes ive made this post before but ive never gotten a general solution to my problem what i want to make is a menu that appears after the loading screen the menu and loading screen are already fully scripted i just need to know how to make the menu appear after the loading screen.
whats the loading screen script? and the menu connect
Heres the two scripts
Loading screen:
local gui = script.Parent
local bg = gui:WaitForChild("Background")
local lb = bg:WaitForChild("LoadingBar")
local bar = lb:WaitForChild("Bar")
local lp = lb:WaitForChild("Loading%")
gui.Enabled = true
wait(2)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
for i = 1, 100 do
wait(0.04)
lp.Text = "Loading..."..i.."%"
local formula = i/100
bar:TweenSize(UDim2.new(formula, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true)
if i == 34 or i == 67 or i == 91 then
wait(1)
end
end
local tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {["BackgroundTransparency"]= 0} )
tween:Play()
tween.Completed:wait()
bg.Visible = false
wait(2)
tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {["BackgroundTransparency"]= 1} )
tween:Play()
tween.Completed:wait()
wait(1)
gui:Destroy()
Menu Screen:
local camera = game.Workspace.CurrentCamera
function updateCamera()
camera.CFrame = game.Workspace:WaitForChild("MenuCamera").CFrame --Makes the camera go to the camera brick
end
game:GetService("RunService").RenderStepped:Connect(updateCamera)
if not game:IsLoaded() then
game.Loaded:Wait()
end
wait(16) -- change this to the ammount of extra time you want the loading screen to be shown
local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local mouse = player:GetMouse()
local defaultcframe = camera.CFrame
local view = 150
local blur = game.Lighting.Blur
local settingsbutton = script.Parent.Settings
local credits = script.Parent.Credits
local play = script.Parent.Play
local title = script.Parent.Title
local logo = script.Parent.Logo
local frame = script.Parent.FrameForButtons
local creditsframe = script.Parent.CreditsFrame
local settingsframe = script.Parent.SettingsFrame
blur.Size = 5 --Makes the blur higher--
script.Parent.Play.MouseButton1Click:Connect(function() --When the player clicks the play button--
wait(0.2) --↓↓ Tweens the frames and buttons ↓↓--
frame:TweenPosition(UDim2.new(0.316, 0, 2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
play:TweenPosition(UDim2.new(-2, 0, 0.546, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
wait(1)
settingsbutton:TweenPosition(UDim2.new(2, 0, 0.695, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 3, true)
wait(1)
credits:TweenPosition(UDim2.new(-2, 0, 0.843, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
logo:TweenPosition(UDim2.new(0.384, 0, -2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 5, true)
title:TweenPosition(UDim2.new(2, 0, 0.165, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
wait(2)
creditsframe:TweenPosition(UDim2.new(0.03, 0, 2.358, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
settingsframe:TweenPosition(UDim2.new(0.721, 0, -2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
wait(2.5)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
blur.Size = 1
game.Workspace.Sound_Folder.Music.Menu_music.MenuMusic:Stop() --Stops the music
camera.CameraType = Enum.CameraType.Custom
script.Parent:Destroy()
script:Destroy()
end)
game.Workspace.Sound_Folder.Music.Menu_music.MenuMusic:Play() ---Plays The Music
--↓↓ Tweens the menu after loading screen ↓↓--
frame:TweenPosition(UDim2.new(0.316, 0, 0.508, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1, true)
play:TweenPosition(UDim2.new(0.375, 0, 0.546, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
wait(1)
settingsbutton:TweenPosition(UDim2.new(0.375, 0, 0.695, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 3, true)
wait(1)
credits:TweenPosition(UDim2.new(0.375, 0, 0.843, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
logo:TweenPosition(UDim2.new(0.384, 0, 0.058, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 5, true)
title:TweenPosition(UDim2.new(0.132, 0, 0.165, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 4, true)
Also the
if not game:IsLoaded() then
game.Loaded:Wait()
end
wait(16)
Is something i tried by my friends say the menu pops up while the loading screen is still in progress
wait whats the name of the screen gui for the menu?
Ill just give you the workspace here
Change the loading script to
local gui = script.Parent
local bg = gui:WaitForChild(“Background”)
local lb = bg:WaitForChild(“LoadingBar”)
local bar = lb:WaitForChild(“Bar”)
local lp = lb:WaitForChild(“Loading%”)
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local mouse = player:GetMouse()
local defaultcframe = camera.CFrame
local view = 150
local blur = game.Lighting.Blur
local settingsbutton = script.Parent.Parent.Menu.Settings
local credits = script.Parent.Parent.Menu.Credits
local play = script.Parent.Parent.Menu.Play
local title = script.Parent.Parent.Menu.Title
local logo = script.Parent.Parent.Menu.Logo
local frame = script.Parent.Parent.Menu.FrameForButtons
local creditsframe = script.Parent.Parent.Menu.CreditsFrame
local settingsframe = script.Parent.Parent.Menu.SettingsFrame
gui.Enabled = true
wait(2)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
for i = 1, 100 do
wait(0.04)
lp.Text = “Loading…”…i…"%"
local formula = i/100
bar:TweenSize(UDim2.new(formula, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true)
if i == 34 or i == 67 or i == 91 then
wait(1)
end
end
local tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {[“BackgroundTransparency”]= 0} )
tween:Play()
tween.Completed:wait()
bg.Visible = false
wait(2)
function updateCamera()
camera.CFrame = game.Workspace:WaitForChild(“MenuCamera”).CFrame --Makes the camera go to the camera brick
end
game:GetService(“RunService”).RenderStepped:Connect(updateCamera)
game.Workspace.Sound_Folder.Music.Menu_music.MenuMusic:Play()
tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {[“BackgroundTransparency”]= 1} )
tween:Play()
frame:TweenPosition(UDim2.new(0.316, 0, 0.508, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1, true)
play:TweenPosition(UDim2.new(0.375, 0, 0.546, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
wait(1)
settingsbutton:TweenPosition(UDim2.new(0.375, 0, 0.695, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 3, true)
wait(1)
credits:TweenPosition(UDim2.new(0.375, 0, 0.843, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
logo:TweenPosition(UDim2.new(0.384, 0, 0.058, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 5, true)
title:TweenPosition(UDim2.new(0.132, 0, 0.165, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 4, true)
tween.Completed:wait()
wait(1)
gui:Destroy()
actually no, i forgot to add some stuff, hold on
Why would i need to wait for child?
I just need the menu to pop up after the loading screen the guis work perfectly fine it just needs to pop up after the loading screen
you should combine both of those scripts and make the menu come after the loading… and it would be much simplrr
change it to this
local gui = script.Parent
local bg = gui:WaitForChild(“Background”)
local lb = bg:WaitForChild(“LoadingBar”)
local bar = lb:WaitForChild(“Bar”)
local lp = lb:WaitForChild(“Loading%”)
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local mouse = player:GetMouse()
local defaultcframe = camera.CFrame
local view = 150
local blur = game.Lighting.Blur
local settingsbutton = script.Parent.Parent.Menu.Settings
local credits = script.Parent.Parent.Menu.Credits
local play = script.Parent.Parent.Menu.Play
local title = script.Parent.Parent.Menu.Title
local logo = script.Parent.Parent.Menu.Logo
local frame = script.Parent.Parent.Menu.FrameForButtons
local creditsframe = script.Parent.Parent.Menu.CreditsFrame
local settingsframe = script.Parent.Parent.Menu.SettingsFrame
gui.Enabled = true
wait(2)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
for i = 1, 100 do
wait(0.04)
lp.Text = “Loading…”…i…"%"
local formula = i/100
bar:TweenSize(UDim2.new(formula, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true)
if i == 34 or i == 67 or i == 91 then
wait(1)
end
end
local tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {[“BackgroundTransparency”]= 0} )
tween:Play()
tween.Completed:wait()
bg.Visible = false
wait(2)
function updateCamera()
camera.CFrame = game.Workspace:WaitForChild(“MenuCamera”).CFrame --Makes the camera go to the camera brick
end
game:GetService(“RunService”).RenderStepped:Connect(updateCamera)
game.Workspace.Sound_Folder.Music.Menu_music.MenuMusic:Play()
tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {[“BackgroundTransparency”]= 1} )
tween:Play()
frame:TweenPosition(UDim2.new(0.316, 0, 0.508, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1, true)
play:TweenPosition(UDim2.new(0.375, 0, 0.546, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
wait(1)
settingsbutton:TweenPosition(UDim2.new(0.375, 0, 0.695, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 3, true)
wait(1)
credits:TweenPosition(UDim2.new(0.375, 0, 0.843, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 4, true)
logo:TweenPosition(UDim2.new(0.384, 0, 0.058, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 5, true)
title:TweenPosition(UDim2.new(0.132, 0, 0.165, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 4, true)
tween.Completed:wait()
wait(1)
gui:Destroy()
the reason why the scripts u did doesnt work because you do enough to make the menu script detect if loading is done
Yeah it would probably but isnt it more orginized to have it in two scripts?
well its more organized to have it one in my opinion but having two makes stuff complicated and hard
I looked at a tutorial for both so i thought combining them would be a hard thing to do
so you can just change loading script to this and remove the side that detects if loading is done in the menu script and also remove the side in the scripts that updates camera to the camera in workspace.
Would this be one script or two im getting confused
or i can help you do it tommorow because i gtg
well you could just say first you do all the tweens for the loading then destroy the loading screen then you make the menu visible…
But each player has a diffrent loading time would this make it so it works on all types of hardware?