Troubles With Making Sound Play For Everybody [SOLVED]

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.

Thanks, all.

1 Like

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:

  1. 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.
  2. 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
  3. 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.
  4. 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
2 Likes

If you want the sound to play for everyone, why are you sending it to the clients and not just playing it with the server script?

Hello, tree! Thank you for the response.

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.

2 Likes

I had done this mainly because it hadn’t worked previously and then I realised the issue now as in the post above. It was a silly mistake on my end.

1 Like