Playing Sounds On Client

Why can’t i play sounds on the client? sound.Play doesn’t do anything, Entity:EmitSound doesn’t do anything, G.EmitSound doesn’t do anything.

More specifically, i am trying to make the local player emit a music sound so sound.Play/G.EmitSound probably isn’t what i want to use. I want the player to hear the sound constantly until it stops playing.


You can’t specify pitch with that function sadly, but it works so i’ll use that for now.

[lua]LocalPlayer():EmitSound(“soundname.wav”, 0, 200, 0.5)[/lua]

Plays a soundname.wav at 200% speed with 50% volume. 0 is the soundlevel. Giving 0 to that makes it play everywhere. I think it’s also possible to specify the worldspawn. And pitch & volume are optional arguments. You have to do this client-side obviously.