How to Make Music Come Back After Coming Back to Main Menu

Could you send a picture of the script you used and a picture of your output

For further reference I would recoomend watching a few youtube tutorials to understand a bit more about ScreenGuis and how they work.

Here are a few resources that can help you better understand how Guis work.

https://developer.roblox.com/en-us/api-reference/class/ScreenGui

https://developer.roblox.com/en-us/api-reference/class/TextButton

https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Click

Sorry for the late response, I was sleeping.

local button = script.Parent --This is the go back to menu button
local music = game.Players.LocalPlayer:WaitForChild("MenuGui").MenuMusic --This is the menu music
local menuGui = game.Players.LocalPlayer:WaitForChild("MenuGui") --This is the menu gui
button.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.MenuGui.MainMenu.Visible = true -- new line here to make it visible
	menuGui.Enabled = true
	music.Playing = true
end)

You will need to re-reference some things. Not everything we reference is what’s exactly happening in your game, we only know the ancestry tree that you provide us with.

There is also no need to make the MainMenu visible?
If it was previously visible, you just need to enable the Gui.

local button = script.Parent --This is the go back to menu button
local music = game.Players.LocalPlayer:WaitForChild("MenuGui").OpenMenuGui.MenuMusic  -- Menu Music
local menuGui = game.Players.LocalPlayer:WaitForChild("MenuGui") -- Menu Gui

button.MouseButton1Click:Connect(function()   
      print("clicked") --If this shows up in the output then the code worked so far and the game detects if you clicked the button
      menuGui.Enabled = true -- Enables the menu gui
      music:Play() -- Plays the music
      --Put the rest of your code here. You may need to re-reference things
end)

Woops I forgot about the menuGui already enabled. I didn’t know what to re-reference things but I’ll try again.

Using print statements in your code is a great way on knowing what works and doesn’t.

I FINALLY DONE IT, I HAD TO DO THE SCRIPT A DIFFERENT WAY.
– This is only for the LocalScript, I also had to make another ScreenGui thanks for riddleminecraft for telling me

button = script.Parent.Parent.Parent.MenuGui.MainMenu.Deploy
music = script.Parent.MenuMusic
script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.MenuGui.MainMenu.Visible = true
	music:Play()
	button.MouseButton1Click:Connect(function()
		music:Pause()
	end)
end)

I FEEL PROUD OF MYSELF!! LETS GOO!!!

Thanks for trying to helping me, also it wasn’t a hastle.

Thanks for trying to help, I found the solution myself.

Thanks for trying to help me, I found out how to do it myself.