So I’m making a Backrooms game, with levels and I just started to make Level 1. I want to achieve that every level has its unique sounds. The problem is that when a player gets to another level, the music of that level stops and the sound of the new level can be heared by every player. I’m trying to make that when a player exits a level, the music only stops to the player.
This is what I tried:
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Wait()
local Leaderstats = Instance.new("Folder", plr)
Leaderstats.Name = "leaderstats"
local CurrLevel = Instance.new("StringValue", Leaderstats)
CurrLevel.Name = "CurrentLevel"
CurrLevel.Value = "Level 0"
local spawns = workspace.Map.Level0.Spawns
local AvailableSpawnPoints = spawns:GetChildren()
local Pos = math.random(1,#AvailableSpawnPoints)
local spawnPoint = AvailableSpawnPoints[Pos]
plr.Character.HumanoidRootPart.CFrame = spawnPoint.CFrame + Vector3.new(0,10,0)
players[plr.Name].PlayerGui:WaitForChild("Ambience"):Play()
players[plr.Name].PlayerGui["Fluorescent Light Humming Sound Effect"].Playing = true
end)
The sounds are in PlayerGui, but they doesn’t play.
How can I make this work?