Skip to main content

CL - AudioMgr - PlaySoundClip

Play a sound clip at a specific position.

Example#

Play sound

local volume = 0.5local pitch = 1.0CL.AudioMgr.Instance:PlaySoundClip(self.soundName, self.soundPosition, false, volume, pitch)

Play sound with randomized pitch

local volume = 0.5local randomPitch = (math.random() + math.random(70, 130)) / 100CL.AudioMgr.Instance:PlaySoundClip(self.soundName, self.soundPosition, false, volume, randomPitch)

User Variables#

Componentvariable
Addressable name of the sound.self.soundName
Vector3self.soundPosition