Speaker

Plays audio of length up to 5 seconds, unless it is powered in which case it can play a full audio.
When clicked or triggered, it will toggle playing music and will play the song id you give it.
:LoadSound() will return a Sound object or nil.
It is a craftable and spawnable non-flammable solid.
It consumes 1 power per tick.
Here is a list of possible sizes that reach the maximum malleability (16) that have integer components: 1x1x16, 1x2x8, 1x4x4, 2x2x4
At its default size (2x2x2) it has a durability of 1, at its maximum size it has a durability of 2.
By default, its colour is #635f62.
Methods
Chat(message)
Displays the message in a chat bubble just like if a player said it.
The message parameter is the message to display in the chat bubble. It is a string.
ClearSounds()
Stops and clears all sounds loaded via :LoadSound().
Sounds remain loaded after the Microcontroller shuts down, so it is recommended to run :ClearSounds() at the start of any scripts which use :LoadSound().
LoadSound(soundId) → loadedSound
Returns a roblox Sound object with the given soundId.
The provided sound ID is a standard roblox asset URI, most often of the form rbxassetid://id.
The resulting Sound exposes only the properties SoundId, Looped, PlaybackSpeed, Pitch, TimePosition and the methods :Play(), :Pause(), :Stop(), and :Destroy().
This function will also return nil if more than 10 sounds have been loaded, to clear these sounds use :ClearSounds().
The soundId parameter is the ID of the sound to load. It is a string.
The loadedSound return is the loaded sound object. It is a Sound. It can also be nil.
local LOOP_START = 2.5
local LOOP_END = 6.5
local speaker = assert(Network:GetPart("Speaker"), "no speaker connected")
speaker:ClearSounds()
local microwaveSound = assert(speaker:LoadSound("rbxassetid://4399963971"), "sound limit reached")
microwaveSound:Play()
for _ = 1, 4 do
microwaveSound.TimePosition = LOOP_START
task.wait(LOOP_END - LOOP_START)
end
microwaveSound:Stop()
microwaveSound:Destroy()
local endingSound = assert(speaker:LoadSound("rbxassetid://110253665387820"), "sound limit reached")
endingSound:Play()
PlaySound(soundId)
Plays a sound with the given soundId. If no soundId is provided it will default to the Audio configuration of the speaker.
The soundId parameter is the ID of the sound to play. If nil, will default to the Audio configuration. It is a string. It can also be nil.
Configurables
Audio
The audio asset ID to be played. It is a string.
Pitch
The pitch at which to play the audio. It is a number.
It ranges between 0 and 3.
Volume
The volume the audio plays at. The maximum volume is determined by the size of the speaker. It is a number.
It ranges between 0 and 1.
Events
Configured(configurerId)
Fires when the object is configured.
The configurerId parameter is the UserId of the player who configured the object. It is a number.
Triggered(otherPart)
Fires when the object is triggered and provides a reference to the part that triggered it.
If a Microcontroller indirectly initiated the triggering of an object, it will return the object rather than the Microcontroller, whereas in the case of directly triggering the object (i.e., calling :Trigger, but not TriggerPort), it will return the microcontroller.
The trigger source remains unchanged if the trigger is sent through something such as an Antenna, but will be set to a RemoteControl if one is present along the trigger line.
The otherPart parameter is the source of the trigger signal. It is a PilotObject.