Checking if the player has a voice chat

Because I want a game that only voice chat players can enter.

local plr = game.Players.LocalPlayer
local VCS = game:GetService("VoiceChatService")

local function CheckIfVCIsEnabled(userId : number)
   local s, enabled = pcall(function()
      return VCS:IsVoiceEnabledForUserIdAsync(userId)
   end)

   if s then
      return enabled
   end
end

local UserHasVC = CheckIfVCIsEnabled(plr.UserId)

if UserHasVC then
   print("The user has voice chat!")
else
   print("The user does not have voice chat!")
end

P.S: This has to be run on the client side, it’s not on the server side; as stated.