Sound

Represents a sound that can be played
Obtained by indexing the SoundAPI
Exists as an object-oriented alternative to sounds:playSound()

Sound.stop

Stops the playback of this sound
overload 1:
Sound:stop()
Method Property Fluent Description Representation
Return Value a Sound

Sound.pos

Sets the position of this sound
Position is given in world coordinates
Default 0
overload 1:
Sound:pos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a Sound
overload 2:
Sound:pos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Sound

Sound.loop

Toggles if this sound should loop
Default false
overload 1:
Sound:loop(loop)
Method Property Fluent Description Representation
loop accepts a Boolean
Return Value a Sound

Sound.getPos

Get this sound position
overload 1:
Sound:getPos()
Method Property Fluent Description Representation
Return Value a Vector3

Sound.setPos

Sets the position of this sound
Position is given in world coordinates
Default 0
overload 1:
Sound:setPos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value nil
overload 2:
Sound:setPos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value nil

Sound.pitch

Sets the pitch of this sound
Default 1
overload 1:
Sound:pitch(pitch)
Method Property Fluent Description Representation
pitch accepts a Number
Return Value a Sound

Sound.attenuation

Sets the attenuation of this sound
Default 1
overload 1:
Sound:attenuation(attenuation)
Method Property Fluent Description Representation
attenuation accepts a Number
Return Value a Sound

Sound.isPlaying

Checks if this sound is being played
overload 1:
Sound:isPlaying()
Method Property Fluent Description Representation
Return Value a Boolean

Sound.pause

Pauses the current playback of this sound
overload 1:
Sound:pause()
Method Property Fluent Description Representation
Return Value a Sound

Sound.getVolume

Gets this sound volume
overload 1:
Sound:getVolume()
Method Property Fluent Description Representation
Return Value a Number

Sound.setPitch

Sets the pitch of this sound
Default 1
overload 1:
Sound:setPitch(pitch)
Method Property Fluent Description Representation
pitch accepts a Number
Return Value nil

Sound.isLooping

Checks if this sound is looping
overload 1:
Sound:isLooping()
Method Property Fluent Description Representation
Return Value a Boolean

Sound.setLoop

Toggles if this sound should loop
Default false
overload 1:
Sound:setLoop(loop)
Method Property Fluent Description Representation
loop accepts a Boolean
Return Value nil

Sound.setVolume

Sets the volume of this sound
Default 1
overload 1:
Sound:setVolume(volume)
Method Property Fluent Description Representation
volume accepts a Number
Return Value nil

Sound.setAttenuation

Sets the attenuation of this sound
Default 1
overload 1:
Sound:setAttenuation(attenuation)
Method Property Fluent Description Representation
attenuation accepts a Number
Return Value nil

Sound.getAttenuation

Gets this sound attenuation
overload 1:
Sound:getAttenuation()
Method Property Fluent Description Representation
Return Value a Number

Sound.getPitch

Gets this sound pitch
overload 1:
Sound:getPitch()
Method Property Fluent Description Representation
Return Value a Number

Sound.play

Plays this sound, or resume a paused sound
overload 1:
Sound:play()
Method Property Fluent Description Representation
Return Value a Sound

Sound.volume

Sets the volume of this sound
Default 1
overload 1:
Sound:volume(volume)
Method Property Fluent Description Representation
volume accepts a Number
Return Value a Sound
a a