Engine Class
AudioDeviceInput
Summary
Properties
Methods
GetConnectedWires(pin: string):{Wire} |
SetUserIdAccessList(userIds: {any}):() |
Events
WiringChanged(connected: boolean,pin: string,wire: Wire,instance: Instance):RBXScriptSignal |
API Reference
Properties
Muted
Code Samples
Push-to-talk
local players = game:GetService("Players")
local userInput = game:GetService("UserInputService")
local audioIn: AudioDeviceInput = players.LocalPlayer:WaitForChild("AudioDeviceInput")
audioIn.Muted = true
local pushToTalkKey = Enum.KeyCode.V
userInput.InputBegan:Connect(function(input: InputObject)
if input.KeyCode == pushToTalkKey then
audioIn.Muted = false
end
end)
userInput.InputEnded:Connect(function(input: InputObject)
if input.KeyCode == pushToTalkKey then
audioIn.Muted = true
end
end)Methods
GetConnectedWires
Events