:Play() and :Stop() for sounds not working?

This is supposed to play a power outage sound but it doesn’t work.
image
I’ve noticed this in some of my games and I don’t really know what’s happening.

Is there anything in the output? This could be caused by many different factors:

  1. Sound was moderated
  2. You aren’t playing the sound object but instead something else
  3. Volume, TimePosition, etc
  4. ROBLOX’s audio update ([Update] Changes to Asset Privacy for Audio)
  5. A previous part of the script errored, thus stopping the script
  6. Some other reason?

Can I see the full code? I might not be able to help if you dont give me the full code.

All the audios I used were from the toolbox and should work properly.

Is there anything erroring in the output?

local plrs = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local ss = game:GetService("SoundService")
local svs = game:GetService("ServerStorage")

plrs.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		hum.Died:Connect(function()
			print(plr.Name.."died")
		end)
	end)
end)

rs.RemoteEvents.Server.ActivateEvent.OnServerEvent:Connect(function(plr, event)
	if event == "lights" then
		if svs.GameValues.EventActive.Value == false then
			svs.GameValues.EventActive.Value = true
			ss.Sounds.Effects.PowerOutage:Play()
			ss.Sounds.MainAmbience.Backrooms:Stop()
			ss.Sounds.MainAmbience.Blackout:Play()
			for i,v in pairs(workspace.MAP.LIGHTS:GetChildren()) do
				v.Material = Enum.Material.Glass
				v.PointLight.Enabled = false
			end
		else
			svs.GameValues.EventActive.Value = false
			ss.Sounds.Effects.PowerOn.Playing = true
			ss.Sounds.MainAmbience.Backrooms.Playing = true
			ss.Sounds.MainAmbience.Blackout.Playing = false
			for i,v in pairs(workspace.MAP.LIGHTS:GetChildren()) do
				v.Material = Enum.Material.Neon
				v.PointLight.Enabled = true
			end
		end
	end
end)

No, not at all. The rest of the code runs fine it’s just the sounds not working.

Try printing something when you play the audio. If it returns nothing, then it’s a matter of the code not running.

But if everything else is actually running alright except for the sound, then it’s a problem of the sound or property.

It’s probably because you didnt set the Parent of the object?

Something is weird here, so it IS running, however I cannot hear it for some reason.

They’re located in SoundService, does it not work there?

I put them in Workspace and now they work, so I guess that was the problem.

I would probably try putting it in Lighting service and try that.

From my experience, sounds will play universally in Lighting.

Repliacted storage also works. Including in folders.