Script API - v1.26.40.20
    Preparing search index...

    Interface PlayerSoundOptions

    Additional options for how a sound plays for a player.

    interface PlayerSoundOptions {
        location?: Vector3;
        loopCount?: number;
        pitch?: number;
        volume?: number;
    }
    Index

    Properties

    location?: Vector3

    Location of the sound; if not specified, the sound is played near a player.

    loopCount?: number

    Number of additional times to repeat the sound after the initial play. 0 (the default) plays the sound once, -1 loops it forever, and a positive integer N plays the sound N + 1 times in total. For example, loopCount: 1 plays the sound twice. The loop count is fixed when the sound starts and cannot be changed afterward. When using -1, see SoundInstance for handle lifetime requirements.

    pitch?: number

    Optional pitch of the sound.

    volume?: number

    Optional volume of the sound.