Menu Music for a Game Script Doesn't Work

I’m creating a game, and I’m working on some Menu Music because that would be nice for the game, but when I close the menu, the music won’t stop. Can anyone help?

Here’s a modified version of the script you showed:

workspace.MenuMusic:Play()
script.Parent.Changed:Connect(function()
if script.Parent.Enabled == false then
workspace.MenuMusic:Stop()
end
end

Use == for conditional checks

= is only if you’re wanting to make a variable equal to something

workspace.MenuMusic:Resume()

if script.Parent.Enabled == false then
    workspace.MenuMusic:Pause()
end
1 Like