Basically, I'm making a menu screen for my PVP game, and whenever a round starts i made it so that the lobby music stops and the game music starts. The problem is, the lobby music never stops the first time, so the game music plays along but the second time it does? Here are the scripts
Local script in startergui:
-- This is for the menu screen
playBtn.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
game.ReplicatedStorage.Joined:FireServer()
script.Parent.Parent.Afk.Enabled = true
script.Parent.Parent.ScreenGui.Enabled = true
script.Parent.Parent.SpectateGui.Enabled = true
script.Parent.Parent.Bugs.Enabled = true
script.Parent.Parent.DonateGui.Enabled = true
script.Parent.Parent.Shop.Enabled = true
Char.HumanoidRootPart.Anchored = false
game.Workspace.Music.Lobby:Play()
-- Lobby is the music
script.Parent:Destroy()
end)
And now, here is the script in serverscriptservice:
local plrs = {}
for i, player in pairs(game.Players:GetPlayers()) do
if player:FindFirstChild("Playing") and player then
table.insert(plrs,player)
end
end
wait(2)
game.Workspace.Lobby.Floor2.Transparency = 0.7
game.Workspace.Lobby.Floor2.Material = "Glass"
game.Workspace.Lobby.Floor2.BrickColor = BrickColor.new('Medium blue')
wait(3)
-- Where the lobby music stops
game.Workspace.Music.Lobby.Playing = false
game.Workspace.Music.Game1:Play()
Help would be greatly appreciated.

1 comment
You can use :Stop() function to stop music