So I'm working on a sound system that only plays to one client (Yes, I'm using FilteringEnabled), and all of my sounds are inside of a modulescript. I'im using 4 scripts (including the module), here they are. (My issue is, it keeps saying what the title says and never plays)
**** If you could help that'd mean a lot, Thank you. v Module Script named "Sounds"
local SoundModule =
{
Birds = "176132295";
Suburbia = "176132394";
SpringSound = "175637232";
DingDong = "173452642";
MessageClose = "173452663";
ClothingEquip = "174308578";
Warp = "173452757";
NPCMessage = "173452617";
NanoSummon = "171951986";
MissionAccept = "171951946";
MissionComplete = "171951929";
};
return SoundModule
v LocalScript inside a button just to test to see if the sound works
local RS =game:GetService("ReplicatedStorage")
local EV = RS:WaitForChild("Events")
local SE = EV:WaitForChild("SoundEvent")
local MO = RS:WaitForChild("Modules")
local S = require(MO:WaitForChild("Sounds"))
local PLR = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
SE:FireServer(PLR,S.DingDong)
end)
v The Client Side Sound Handler
local RS =game:GetService("ReplicatedStorage")
local EV = RS:WaitForChild("Events")
local SE = EV:WaitForChild("SoundEvent")
local MO = RS:WaitForChild("Modules")
local SO = script.Parent:WaitForChild("Sound")
SE.OnClientEvent:connect(function(PLR,id)
SO.SoundId = id
SO:Play()
end)
v And the ServerSideHandler in Workspace
local RS =game:GetService("ReplicatedStorage")
local EV = RS:WaitForChild("Events")
local SE = EV:WaitForChild("SoundEvent")
local MO = RS:WaitForChild("Modules")
SE.OnServerEvent:connect(function(PLR,soundId)
SE:FireClient(PLR,soundId)
end)

2 comments
try putting SO.SoundId = tostring(id) at line 08, client side sound handler
ok thx