ðŸ“ŧSoundService

Service for playing sounds.

Example usage:

-- Play a honk sound whenever an entity takes damage
Events.EntityDamage(function(event)
    local attackedPosition = event.entity:getPosition()
    SoundService.playSound(SoundType.VOICE_HONK, attackedPosition)
end)

Functions

playSound(sound: SoundType, position: Vector3 | nil)

Plays a sound globally. You can optionally specify where the sound will come from.

playSoundForPlayer(player: Player, sound: SoundType, position: Vector3 | nil)

Plays a sound for a specific player. You can optionally specify where the sound will come from.

Last updated