Hello, all, I want to make a sound play for everyone. However, when I try to achieve this, it always only plays for one person. I have tried quite a bit of things, such as, creating a clone of the sound on the server and moving it to the players head then playing, turning off SoundService’s “RespectFilteringEnabled”, and also firing a remote even to all clients and then making the sound happen.
Here is my current code (server, however excluded part of the remote event to save some information):
local remote = game:GetService("ReplicatedStorage"):WaitForChild("Assets")["CastingSoundsRemote"]
if sequence == "SFXS" then
remote:FireAllClients(plr.Character.Head, false)
elseif sequence == "SFXE" then
remote:FireAllClients(plr.Character.Head, true)
end
Here is my current code for the client:
local castingRemote = game:GetService("ReplicatedStorage"):WaitForChild("Assets")["CastingSoundsRemote"]
local castingSound = game:GetService("ReplicatedStorage"):WaitForChild("Assets")["CastingSound"]
local castedSound = game:GetService("ReplicatedStorage"):WaitForChild("Assets")["CastedSound"]
castingRemote.OnClientEvent:Connect(function(part, finished)
print(`hey {part} | {finished}`)
if finished == false then
local clone = castingSound:Clone()
clone.Parent = part
clone:Play()
game.Debris:AddItem(clone, 0.323)
elseif finished == true then
local clone = castedSound:Clone()
clone.Parent = part
clone:Play()
game.Debris:AddItem(clone, 1)
end
end)
I know that it isn’t an issue of sending information through, but I just can’t figure it out. Been bothering me for a day or so, any help would be appreciated.
The setups you describe should work, so something else could be happening. How are you confirming that it’s only working for 1 person? Are you testing it in-game or using Roblox Studio’s client and server testing session?
I would probably do the following things first to rule of any problems.
THIS IS DONE ON THE CLIENT THATS NOT HEARING THE SOUND:
Manually play the sound using the command bar and see if you can hear it. This will catch problems with the sound instance itself such as the sound not loading in time.
Create a brand new sound instance from explorer, add the ID, and play the sound to rule out anything related to sound groups and other sound settings like roll off distance
Create a brand new roblox place and test the sound specific sound on there. This will rule out whether the sound ID is bad and the bad settings in SoundService.
Make sure your remote chain (client → server → client) is good, debug it and make sure the remote requests are making it through each stage of the sound replication
You had led me to insight that I didn’t quite think of yet. You mentions how am I testing this. So I was testing simply by opening up two clients via the test tab. I was thinking about it, and thought a while. Everything else worked that you mentioned. I then went ahead and listened again. I noticed when I had stepped on the other account, I couldn’t hear it either which should of been a red flag. The second I cast the spell and switched to the other tab I could hear it.
It was a silly mistake on my end, and thank you very much for the response.