AudioDeviceInput
Mostrar obsoleto
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Resumen
Propiedades
Métodos
Eventos
Propiedades
AccessType
Active
IsReady
Muted
Muestras de código
Empujar para hablar
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)