How to make a menu gui appear after the loading screen Still having this issue

Hello im making a menu and i want it to appear after the loading screen finishes keep in mind this scripts tweens are still being made thats why it is incomplete.
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:Wait()

			local mouse = player:GetMouse()
			local camera = game.Workspace.CurrentCamera
			local defaultcframe = camera.CFrame
			local view = 150
			local blur = game.Lighting.Blur
			local tweenservice = game:GetService("TweenService")
			local settingsbutton = script.Parent.FrameForButtons.Settings
			local credits = script.Parent.FrameForButtons.Credits
			local play = script.Parent.FrameForButtons.Play
			local title = script.Parent.FrameForButtons.Title
			local logo = script.Parent.FrameForButtons.Logo


			blur.Size = 5


			function updateCamera()
				camera.CFrame = game.Workspace.MenuCamera.CFrame
			end

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

			script.Parent.FrameForButtons.Play.MouseButton1Click:Connect(function()
				wait(0.2)
				blur.Size = 1
				game.Workspace.Sound_Folder.MenuMusic:Stop()
				camera.CameraType = Enum.CameraType.Custom
				script:Destroy()
				script.Parent.FrameForButtons:Destroy()
				script.Parent:Destroy()
			end)


			TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, false, 0)

			play:TweenPosition(UDim2.new(0.163, 0, 0.088, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.1, true)

maybe make a signal that tells the script that it finishes loading

1 Like

But how would i make that?
ive tried using a if statement but that just destroys the loading gui.

maybe try to use BindableEvent?

like this:

--Script1
game.ReplicatedStorage.BindableEvent:Fire()
--Script2
game.ReplicatedStorage.BindableEvent.Event:Connect(function()
   print("did somebody called me?")
end)

difference between RemoteEvent and BindableEvent:

RemoteEvent allows scripts to communicate by server-client/client-server

BindableEvent allows scripts to communicate by server-server/client-client

but the same thing is:
both can’t make the script responds like what RemoteFunction/BindableFunction can do

Is the loading screen only shown while the game is loading or is the loading screen shown for a set amount of time?

1 Like

Uhhhhhh both? Because it helps the game load and then it has some extra time to make sure everything is loaded in since not all player loading times are the same.

What exactly does this block of code do?

1 Like

Stops music makes the blur for the lighting back to 1 puts the camera back at the player destroys the script i think destroys the frame for buttons frame and destroys the gui.
I followed a tutorial for this so yeah.

So it’s destroying the loading screen? Or the menu?

1 Like

The menu when you click the play button all that stuff i mentioned happens.
This is the menu screen script

So you want this to run when the game is finished loading? Am I correct?

1 Like

Yes i want all the buttons to tween into there set positions when the game finishes loading ALSO
i am done with the tweening part of the script here it is.

	wait(10)
	play:TweenPosition(UDim2.new(0.375, 0, 0.546, 0), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 5, true)
	settingsbutton:TweenPosition(UDim2.new(0.375, 0, 0.695, 0), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 6, true)
	credits:TweenPosition(UDim2.new(0.375, 0, 0.843, 0), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 7, true)
	logo:TweenPosition(UDim2.new(0.384, 0, 0.058, 0), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 5.5, true)
	title:TweenPosition(UDim2.new(0.132, 0, 0.165, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 4.5, true)
	frame:TweenPosition(UDim2.new(0.316, 0, 0.508, 0), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 4, true)

The wait is just for testing.

Try this:

if not game:IsLoaded() then
	game.Loaded:Wait()
end

wait(1) -- change this to the ammount of extra time you want the loading screen to be shown

-- Do all the tween stuff and any other things that you need to do to bring up the menu

edit: the script would have to be it replicated first for it to detect if the game has loaded but you can get all the gui variables by doing player.PlayerGui

1 Like

Ok thanks ill try tomarrow i gotta go so cya!

1 Like

This is off topic but im still having this issue i asked my friends to play test it and the menu appeared when the loading gui was still working what should i do?