Random Death Sounds

I wanted to create a random sound whenever a player died, but I managed to screw it up completely and I have no idea what to do next.

I tried using a random table but it wasn’t working

[lua]
local RandomDeathSounds = { }
RandomDeathSounds[ 1 ] = (“sound.wav”, 511, 100)
[/lua]

[lua]
function playerDies( victim, weapon, killer )
victim:EmitSound(table.Random(RandomDeathSounds))
end
hook.Add( “PlayerDeath”, “playerDeathTest”, playerDies )
[/lua]

Any Ideas?

Problem Resolved :slight_smile: