bad argument #3 to 'SoundId' (string expected, got nil)?
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"
04 | Suburbia = "176132394" ; |
05 | SpringSound = "175637232" ; |
06 | DingDong = "173452642" ; |
07 | MessageClose = "173452663" ; |
08 | ClothingEquip = "174308578" ; |
10 | NPCMessage = "173452617" ; |
11 | NanoSummon = "171951986" ; |
12 | MissionAccept = "171951946" ; |
13 | MissionComplete = "171951929" ; |
v LocalScript inside a button just to test to see if the sound works
01 | local RS = game:GetService( "ReplicatedStorage" ) |
02 | local EV = RS:WaitForChild( "Events" ) |
03 | local SE = EV:WaitForChild( "SoundEvent" ) |
04 | local MO = RS:WaitForChild( "Modules" ) |
05 | local S = require(MO:WaitForChild( "Sounds" )) |
07 | local PLR = game.Players.LocalPlayer |
09 | script.Parent.MouseButton 1 Click:connect( function () |
10 | SE:FireServer(PLR,S.DingDong) |
v The Client Side Sound Handler
01 | local RS = game:GetService( "ReplicatedStorage" ) |
02 | local EV = RS:WaitForChild( "Events" ) |
03 | local SE = EV:WaitForChild( "SoundEvent" ) |
04 | local MO = RS:WaitForChild( "Modules" ) |
05 | local SO = script.Parent:WaitForChild( "Sound" ) |
07 | SE.OnClientEvent:connect( function (PLR,id) |
v And the ServerSideHandler in Workspace
1 | local RS = game:GetService( "ReplicatedStorage" ) |
2 | local EV = RS:WaitForChild( "Events" ) |
3 | local SE = EV:WaitForChild( "SoundEvent" ) |
4 | local MO = RS:WaitForChild( "Modules" ) |
6 | SE.OnServerEvent:connect( function (PLR,soundId) |
7 | SE:FireClient(PLR,soundId) |