Players emit sound.

How would I go about making a player emit a sound in a function, and doing it every random time between 10-15 seconds? math.Rand( 10, 15) ?

Use Surface.PlaySound to play a sound clientside. (no one else but the client can hear it).

There is also Entity.EmitSound where the entity emits a sound, relative to its location, and all other players can hear it within range.

How you call these is up to you. You could use a constant,repeating timer, or like Emz said, you could use a Think hook along with Curtime.

How you get the player entity is again, varies with different methods.

How would I take Entity.EmitSound and have the player be selected as the entity?

[lua]
ply:EmitSound(“Path/To/Sound.wav”, 500, 200)
[/lua]

Oh! hehe, that simple? Thanks Helix :smiley:

The 500 and 200 are relative to the volume and pitch, remember that, they’re optional though.