エンジンクラス
AudioDeviceInput
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
プロパティ
方法
GetConnectedWires(pin: string):{Wire} |
SetUserIdAccessList(userIds: {any}):() |
イベント
WiringChanged(connected: boolean,pin: string,wire: Wire,instance: Instance):RBXScriptSignal |
APIリファレンス
プロパティ
Muted
コードサンプル
プッシュトーク
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)方法
イベント