Hello
With the new audio api, it’s possible to make voice chat calls and radios, but I’m struggling to use it ![]()
I’ve tried connecting AudioDeviceInput and AudioEmitter together with wires n stuff but it’s not transmitting any sound through.
Mostly just want help understanding how it works.
This is the code I’ve tried
game.ReplicatedStorage.Events.VoiceConnectEvent.OnServerEvent:Connect(function(plr: Player, target: Player)
local p1VoiceInput = Instance.new("AudioListener")
local p1VoiceOutput = Instance.new("AudioEmitter")
p1VoiceInput.Parent = plr.Character.Head
p1VoiceOutput.Parent = plr.Character.Head
local p2VoiceInput = Instance.new("AudioListener")
local p2VoiceOutput = Instance.new("AudioEmitter")
p2VoiceInput.Parent = target.Character.Head
p2VoiceOutput.Parent = target.Character.Head
local p1ListenWire = Instance.new("Wire")
local p2ListenWire = Instance.new("Wire")
p1ListenWire.SourceInstance = p1VoiceInput
p1ListenWire.TargetInstance = p2VoiceOutput
p1ListenWire.Parent = p1VoiceInput
p2ListenWire.SourceInstance = p2VoiceInput
p2ListenWire.TargetInstance = p1VoiceOutput
p2ListenWire.Parent = p2VoiceInput
end)