Proffesional Main Menu

I’ve seen easy main menus in each roblox game, such as in coffees, vibe games, story games, etc. But I wonder how do I make a proffesional main menu with this following things.

  1. The Main Menu must have something unique, for example when you enter the game and you decide to reset, you get brought back to the main menu. However when you already pressed play and reset, the main menu doesn’t pop up again.
  2. The Main Menu must have a camera intro, so you have a big view of everything.

Here’s an example of a game, which I mean.
Realm of the 9 Portals - Roblox - Google Chrome (gyazo.com)
Realm of the 9 Portals - Roblox - Google Chrome (gyazo.com)
https://gyazo.com/09155eb6e6d5b97b64ba94afe5789440

2 Likes

For 1, you can use this. It will disable the ScreenGUI Object.

-- LocalScript
local PlayButton = script.Parent -- Assuming it is a child of the Play Button.

PlayButton.MouseButton1Click:Connect(function()
PlayButton.Parent.Parent.Enabled = false --Assuming the GUI hierarchy looks like ScreenGUI > Frame > PlayButton. Edit accordingly if this is not the case.
end)

For 2, you can use game.Workspace.Camera

Watch this tutorial for more detail:

2 Likes

Hold on, I just checked your examples.
For 2, heres the script.

-- LocalScript
local cam = game.Workspace.CurrentCamera
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
local UIS = game:GetService("UserInputService")

local mouseLocation = UserInputService:GetMouseLocation()

game:GetService("RunService").Heartbeat:Connect(function(step)
cam.CFrame = mouseLocation
end)

I’ll try to use this, when something is wrong I reply to you. Else I mark your answers as a Solution.

https://gyazo.com/f134e000c78bfb563e99247ff9bd5a83 well this is what I got, not sure if I forgot something.

Oh, that was my bad.
Replace the second script with


-- LocalScript
local cam = game.Workspace.CurrentCamera
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
local UIS = game:GetService("UserInputService")

local mouseLocation = UserInputService:GetMouseLocation()

game:GetService("RunService").Heartbeat:Connect(function(step)
cam.Position = Vector2.new(mouseLocation.X, mouseLocation.Y)
end)

For the first link, you can probably search up videos for this if not,
You need a script/localscript and you need to check if the mouse has moved, if so it moves the camera angle.

2 Likes

Not sure if you tested this script, it doesn’t work.

I had a similar problem and it was solved in this post:

2 Likes