I was experimenting with voice chat and the ability to show when a player has voice chat to non vc able players (I hope you followed that) and when messing with the Roblox provided voice chat detection script.
local Players = game:GetService("Players")
local VoiceChatService = game:GetService("VoiceChatService")
local localPlayer = Players.LocalPlayer
local success, enabled = pcall(function()
return VoiceChatService:IsVoiceEnabledForUserIdAsync(localPlayer.UserId)
end)
if success and enabled then
print("success ez")
localPlayer.PlayerGui.MyVoiceGui.Enabled = true
end
I get no return through output and nothing saying it’s working. It’s in a local script as of right now.
If anyone could help me it would mean a great bit. Thanks!
local Players = game:GetService("Players")
local VoiceChatService = game:GetService("VoiceChatService")
local localPlayer = Players.LocalPlayer
local success, enabled = pcall(function()
return VoiceChatService:IsVoiceEnabledForUserIdAsync(localPlayer.UserId)
end)
if enabled then
print("success ez")
localPlayer.PlayerGui.MyVoiceGui.Enabled = true
end