Replicating sound to other players while playing it inside a player

I want to replicate the player gunfire sound to every other client, but creating a new sound and parenting it to the player who fired their gun doesn’t work when I test it using the multi-client simulation.

Local:

local fireSound = toolModel.Source.Fire

function PlaySound(sound)
	remotePlaySound:FireServer(sound, toolModel.Source)
end

Server scripts:

remotePlaySound.OnServerEvent:Connect(function(player, sound, source)
	local serverSound = Instance.new("Sound")
	serverSound.SoundId = sound.SoundID
	serverSound.Parent = source
	serverSound:Play()
end)

Are you sending a sound instance created on the client to the server? If you are, it will not be visible to the server. Try using a string parameter for the SoundId instead.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.