Simple way to play sounds to all players?

How can I set that a player via a menu can activate a sound that the rest of the players can hear?

I tried these:


But when I try them no sound comes out and no errors either.

[lua]for _,v in pairs(player.GetAll()) do
v:ConCommand(“playsound /path/sound.wav”)
If playsound doesn’t work try using play.

Why is everybody trying to overcomplicate it besides me?

I created a Derma Menu, making it as a Taunt Menu for Prop Hunt.
I don’t look to make it too complex.

The following code plays the sound to everyone?


for _,ply in pairs(player.GetAll()) do

That will do so that all the players will play the same sound at the same time and other players will hear it

Then you can just do this:
for _,ply in pairs(player.GetAll()) do

My bad the first will work if you put in a clientside file.

If you want to play music from an URL(MP3) to a person or anyone, you could use this code snippet, and replace the URL in it. (You can use both ply:SendLua(for a single target) and BroadcastLua(for everyone on the server)

BroadcastLua(sound.PlayURL(“”, " ", function(x) end))
– So fun to troll with :wink: