Team Voice Chat Module
Hello! For a Brief Introduction, my name is Nazuh, and I've been working on a team voice chat module and thought I'd share it with you guys. Anothering thing to note, this is my first devforum post so any suggestions or helpful comments are extremely appreciated ♥ : ). Feel free to add me on discord, @nazuh, if you have any questions or concerns and I will try my best to get back to you.
NOTE 1:
This requires VoiceChatService.EnableDefaultVoice to be false,
and VoiceChatService.UseAudioApi to be set to Enabled!
NOTE 2:
To disable the Overhead Voice Toggle Bubble, head over to
'TextChatService.BubbleChatConfiguration' and set 'MaxDistance' to 0.
WARNING:
THIS WILL HIDE BUBBLE CHAT!
Showcase
In the video, you can see once the player joins the green team I can hear them talking
Setup
The setup is quite simple, just make sure you have the TeamChat module in a place accessible to both the server and the client.
Server:
local TeamChat = require(path.to.module)
local TeamChatServer = TeamChat.Init()
Client:
local TeamChat = require(path.to.module)
local TeamChatClient = TeamChat.Init()
TeamChatClient.PlayerStartedSpeaking:Connect(function(Player)
print(Player.Name .. 'Has Started Speaking!')
end)
TeamChatClient.PlayerStoppedSpeaking:Connect(function(Player)
print(Player.Name .. 'Has Stopped Speaking!')
end)
-- How frequent your client checks if there was a change in your speaking state
-- and sends it to the server if there was a change.
-- also has a corresponding get function: GetSpeakingCheckInterval()
TeamChatClient:SetSpeakingCheckInterval(5) -- default 0.1
-- essentially just the minimum volume that is considered you speaking
-- also has a corresponding get function: GetMinRmsLevelThreshold()
TeamChatClient:SetMinRmsLevelThreshold(0.02) -- default 0.01
30 Likes
Version 1.1.0 Update
Added Support for developers to disable voice chat for certain teams
To utilize this functionality simply add any instance to your team object and name it ‘VoiceDisabled’
7 Likes
Like it, might modify it for area talking rather than teams. Nice release.
6 Likes
This is dope, Will definitely use this! Could you share the file with me that has the UI though??
5 Likes
Hey, this is great, if you wouldn’t mind can I ask that instead of creating and placing any instance under the team named VoiceDisabled
, Adding a function to disable voice for a team will be much better I think. Good utility tho.
3 Likes
Also, does this support directional voices? I.E. if a player is away you will hear him less and if he is near you will be able to hear his voice more.
3 Likes
Currently it works just like how games like Cod, or any type of pvp game works, your voice gets sent directly to other players. I’l try and implement another version where it’s proximity so that you can choose for each team.
3 Likes
The test world is uncopylocked! Team Chat Test - Roblox
3 Likes
Aah, Alright! Thank you! I will check that place out.
2 Likes
Maybe add a function where u have proximity voicechat for everyone and the team voice chat.
2 Likes
This is wonderful! Thanks so much! Making tactical games will be some much easier!
2 Likes
Using your client example, I recall.
TeamChatClient.PlayerStartedSpeaking:Connect(function(Player)
print(Player.Name .. 'Has Started Speaking!')
end)
TeamChatClient.PlayerStoppedSpeaking:Connect(function(Player)
print(Player.Name .. 'Has Stopped Speaking!')
end)
the Player.Name just prints ‘Player’ for me, Nothing else.
Anyway to fix this?
I’ll check that out right now.
It seems I had forgotten to remove a bit of debug code in the Client module. This will be fixed in the next update.
Could you send a screenshot as well just so I can confirm that was in-fact the issue.
I did now, Here you go.
Edit: Add me on discord so u can maybe explain me how this entire audio api works xD
1 Like
I’m working on an update for this right now!
1 Like
Seems really cool! You should upload it as a model to roblox.
1 Like
I’ve edited the post so now the ‘RBXM File’ link takes you to the creator store instead of directly download the file from the github.
1 Like