Hi, I am trying to make a sound in SoundService play when a BindableEvent fires. Similar scripts like this one have worked in the same scenario when the sounds aren’t in SoundService. Does anyone know what I can do?
The audio needs to be in SoundService for it to be able to be heard across everything.
This script is in ServerScriptService, and it is a server script.
local soundService = game:GetService("SoundService")
local restoreSound = soundService.RestoredPower
local restoreEvent = game.ReplicatedStorage.BindableEvents.EnablePower
local outageSound = soundService.PowerOutage
local outageEvent = game.ReplicatedStorage.BindableEvents.DisablePower
restoreEvent.Event:Connect(function()
restoreSound:Play()
end)
outageEvent.Event:Connect(function()
outageSound:Play()
end)