How do I make it so Main Menu appears after Loading Screen

I want to make it so the Main Menu Appears after the Loading screen but it currently looks like this

I am trying to make it so that after the loading is done the main menu appears, and also if they skip it appears.

I looked at another post, but I don’t think it will work with my code. (am new to scripting so help is appreciated) I can send screenshots of code but, I don’t know what to send.

1 Like

Well is your main menu in a different screengui? or is it another frame?

Instead of looking at questions like yours, you should be looking at it as ‘How can I make a frame/screengui visible/invisible?’

If you need any help though you’ll need to give some more information such as the scripts and what the starter gui looks like

1 Like

It’s a different screen GUI
image

Do you have a script that handles when the loading is finished and when the skip button is clicked?
Because once one of those events happen, you need to run this code:

path_to_screengui.Enabled = true

if your not sure show me the current code

The Skip Button Code:

local TweenService = game:GetService("TweenService")

local GradientTweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

script.Parent.MouseButton1Click:Connect(function()
	script.Enabled = false
	script.Parent.Parent.Parent.Parent.MainLoadingSequenceConfig.Enabled = false
	script.Parent.Parent.Parent.Parent.RandomTextConfig.Enabled = false
	TweenService:Create(script.Parent.Parent.Parent.Parent.Parent.UIGradient, GradientTweenInfo, {Offset = Vector2.new(-1,0)}):Play()

	print("Asset loading skipped.")

	wait(1)
	
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)

	script.Parent.Parent.Parent.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.Parent.Parent.UIGradient:Destroy()

	script.Parent.Parent.Parent.Parent.Parent.Parent:Destroy()
end)

MainLoadingSequence

local ModuleScript = script.Parent.Parent.Parent.Settings
local Settings = require(ModuleScript)

script.Parent.Parent.Visible = true
script.Parent.Visible = true
	
local ContentProvider = game:GetService("ContentProvider")
local AssetFolder = Settings.LoadingScreen.AssetFolder:GetDescendants()
local TweenService = game:GetService("TweenService")
local LoadingBarTweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In)



if Settings.LoadingScreen.SkipButton == true then
	script.Parent.Elements.Skip.Visible = true
else
	script.Parent.Elements.Skip.Visible = false
end

if Settings.LoadingScreen.LoadingBar == true then
	script.Parent.LoadingBar.Visible = true
else
	script.Parent.LoadingBar.Visible = false
end

if Settings.LoadingScreen.RandomizedTextEnabled == true then
	script.Parent.RandomizedText.Visible = true
else
	script.Parent.RandomizedText.Visible = false
end

if Settings.LoadingScreen.DefaultRobloxUI == true then
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
else
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end

script.Parent.Elements.Background.Image = Settings.LoadingScreen.BackgroundImage
script.Parent.Elements.TopText.Text = Settings.LoadingScreen.TopText
script.Parent.Elements.BottomText.Text = Settings.LoadingScreen.BottomText



local LoadAssets = #AssetFolder

for i, v in pairs(AssetFolder) do
	ContentProvider:PreloadAsync({v})
	TweenService:Create(script.Parent.LoadingBar.LoadingBar, LoadingBarTweenInfo, {Size = UDim2.new(i/LoadAssets,0,1,0)}):Play()
end

local GradientTweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
	
TweenService:Create(script.Parent.Parent.UIGradient, GradientTweenInfo, {Offset = Vector2.new(-1,0)}):Play()

print("Assets loaded.")
	
wait(1)

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)

script.Parent.Visible = false
script.Parent.Parent.UIGradient:Destroy()

script.Parent.Parent.Parent:Destroy()

Could you show the full startergui? I want to know where the scripts are located.

1 Like

@ItzBloxyDev You still there? I can wait till tomorrow, but eh

You deleted the posts I assumed you didn’t need help anymore

Ah, No I thought you were gonna steal code and stuff


You can do this without code. All you need to do is set the LoadingGui’s DisplayOrder to a value higher than the Menu’s. After setting the loading screen’s Visible property to false the Menu will appear.

image
set it above the menu, I set the LoadingGui to visible to false but it still appears

I mean when the LoadingGui (the ScreenGui, not the frame) has Enabled property true it will hide the Menu, when it is not the Menu will appear. Sorry if it was confusing


I have it enabled still happens

When I set the MenuFrame to not visible at all, It doesn’t show but it does disappear on loading screen

Is the DisplayOrder higher than the Menu ScreenGui (it is 0 in the screenshot)? You need to set that, not the frames inside. (or just set it to a huge number)

2 Likes

Omg I didn’t know what you meant by DisplayOrder, Thank you that solved it :smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.