So making a main menu isn’t as hard as you think! The hardest part might be making the main menu, making sure it fits on all devices. Takes time but it’s totally worth it.

You are watching: How to make a start menu in roblox

Here is a menu I created for one of my games:


*

Once you have your settings ready, go ahead to the settings button that opens the settings frame.

This is the code you want to add:

local player = game.Players.LocalPlayerlocal frame = player.PlayerGui:WaitForChild("MainMenu").Framelocal Credits = frame.Creditslocal settingsFrame = frame.SettingsFramescript.Parent.MouseButton1Click:Connect(function()if Credits.Visible == true thenCredits.Visible = falsesettingsFrame.Visible = trueelseCredits.Visible = truesettingsFrame.Visible = falseendend)Clone this local script to any buttons that open the settings frame.

This only opens the settings frame and closes the credits frame. If you click the button again, it closes the settings frame and opens the credits frame. Its like a toggle button!

Now go ahead to your FOV (Field of View) setting and add the following code to the TEXTBOX:

local camera = workspace.CurrentCamera -- Access to the players cameralocal fovText = game.Players.LocalPlayer.PlayerGui:WaitForChild("MainMenu").Frame.SettingsFrame.FOVTextfovText.FocusLost:Connect(function(enterPressed)if enterPressed then -- If the player pressed "enter" on their keyboard...camera.FieldOfView = fovText.Textendendend)Easy peasy. Next, go to the sound button and enter this script:

local sound = sound -- Enter where your sound is located. Because this is a local script, it will turn off the sound to the local player only.local player = game.Players.LocalPlayerlocal playing = true -- By default, the sound is playingscript.Parent.MouseButton1Click:Connect(function()if playing == true then -- If the sound is playing...sound.Playing = falseplayer.PlayerGui:WaitForChild("MainMenu").Frame.SettingsFrame.SoundOnOrOff.Text = "Off"else -- If the sound isn"t playing...sound.Playing = trueplayer.PlayerGui:WaitForChild("MainMenu").Frame.SettingsFrame.SoundOnOrOff.Text = "On"endend)Done and done! Next one is probably the hardest setting to make… the chat theme…

Enter this local script inside of the Chat Theme button:

local player = game.Players.LocalPlayerlocal white = true -- By default, the chat is white themedlocal ChatTheme = player.PlayerGui:WaitForChild("MainMenu").Frame.SettingsFrame.ChatThemeButtonlocal chat = game:GetService("Chat")script.Parent.MouseButton1Click:Connect(function()if white == true thenwhite = falselocal settings = {-- Now here, you can edit it to anything you want! These are the chat settings that are applied after the player clicks the button! Make sure the background color and the text color are different.BubbleDuration = 15,MaxBubbles = 3,BackgroundColor3 = Color3.fromRGB(0,0,0),TextColor3 = Color3.fromRGB(250,250,250),TextSize = 16,Font = Enum.Font.GothamSemibold,Transparency = .1,CornerRadius = UDim.new(0, 12),TailVisible = true,Padding = 8,MaxWidth = 300,VerticalStudsOffset = 0,BubblesSpacing = 6,MinimizeDistance = 40,MaxDistance = 100,}ChatTheme.Text = "Black" -- Sets the text in the theme button to "Black"pcall(function()game:GetService("Chat"):SetBubbleChatSettings(settings) -- Applies the settingsprint("Chat settings applied") -- Success messageend)elsewhite = true -- If the value was "Black" then...local settings = {BubbleDuration = 15,MaxBubbles = 3,BackgroundColor3 = Color3.fromRGB(250,250,250),TextColor3 = Color3.fromRGB(0,0,0),TextSize = 16,Font = Enum.Font.GothamSemibold,Transparency = .1,CornerRadius = UDim.new(0, 12),TailVisible = true,Padding = 8,MaxWidth = 300,VerticalStudsOffset = 0,BubblesSpacing = 6,MinimizeDistance = 40,MaxDistance = 100,}pcall(function()game:GetService("Chat"):SetBubbleChatSettings(settings) -- Appliesprint("Chat settings applied") -- Successend)ChatTheme.Text = "White" -- Changes the theme button text to white.endend)And thats done!

Scripting the open button

Last thing we have to do is script the open button…

Lets define our variables first.

local player = game.Players.LocalPlayerlocal frame1 = player.PlayerGui:WaitForChild("MainMenu").Framelocal frame2 = player.PlayerGui:WaitForChild("MainMenu").BackGroundFramelocal TweenService = game:GetService("TweenService")local closed = frame1.Parent.Closedlocal db = falselocal blur = game.Lighting.MenuBlurBy now, you should see these and think that they are familiar… yes! They are! We used the same variables in our close button.

See more: How To Delete My Vudu Account, How Do I Delete My Vudu Account

Rest of the script:

script.Parent.MouseButton1Click:Connect(function()if db == false thenif closed.Value == true then -- If the closed value is true (meaning its closed), then...db = truelocal goal = {}goal.Position = UDim2.new(0,0,0,0) -- This is the centre of the screen. We want the menu to go there.local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out) -- Change if you wish...local tween1 = TweenService:Create(frame1, tweenInfo, goal)local tween2 = TweenService:Create(frame2, tweenInfo, goal)frame1.Visible = true -- Making sure our frames are visible before tweeningframe2.Visible = truetween1:Play() -- Tween both frames.tween2:Play() frame1.Parent.OpenMenu.Visible = false -- Makes the open button disappear...if blur.Enabled == false then -- Making sure the blue effect is enabled...blur.Enabled = trueendif blur.Size == 0 then -- Here, we are checking the blur is at 0, just to make sure our blur is disabled.while wait(0.1) do -- Every 0.1 seconds, it adds 1 to the size of the blur.blur.Size += 1if blur.Size == 24 then -- Once it gets to 24, it stops and the script continues.breakendendendwait(1)closed.Value = false -- Changes the closed value to false meaning its opendb = false -- Cooldown is off!elsewarn("DB On")endendend)Thats all you have to do! You just finished making your very own interactive main menu with settings!

Conclusion

Below I have attached the model, if you want to just download it and add it! Once you insert it, just move the ScreenGui to StarterGui and move the MenuBlur to Lighting.