AudioSource.PlayOneShot(AudioClip clip, number volumeScale = 0)
Plays an AudioClip, and scales the AudioSource volume by volumeScale.
Parameters:
Name | Type | Description |
---|---|---|
clip | AudioClip | The clip being played. |
volumeScale | number | The scale of the volume (0-1). |
Usage
---@type AudioSource
local audiosource;
---@type AudioClip
local clip;
---@type number
local volumeScale;
audiosource.PlayOneShot(clip, volumeScale)