Voice Chat Tag Error

I’m trying to make it so that if someone has vc enabled it shows it above the players head and also if they don’t, but I keep getting an error.

Code: (ServerScript)

local vcs = game:GetService("VoiceChatService")

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local tag = game.ServerStorage.VoiceTag:Clone()
		tag.Parent = char:WaitForChild("Head")
		tag.Adornee = char:WaitForChild("Head")
		if vcs:IsVoiceEnabledForUserIdAsync(plr.UserId) then
			tag.Frame.ImageLabel.Image = "rbxassetid://7951705172"
		else
			tag.Frame.ImageLabel.Image = "rbxassetid://7951704608"
		end
	end)
end)

Error:
VoiceChatService:IsVoiceEnabledForUserIdAsync() is not yet implemented on the server (line 8)

Try changing the tag.Adornee = char:WaitForChild(Head) to tag.Humanoid = char:WaitForChild(Head)

1 Like

Did this seem to help with the error?

1 Like

Oh yeah, I guess this would make more sense. lol

image

Try it in a local script instead.

1 Like

Can you take a screenshot of your explorer? I want to know what this script is under.

1 Like

Screenshot 2021-11-09 at 22.56.20

this is all that is relevant to the script

yes i’ve realised it’s bad practice to name the script the same as the tag

Can I see the VoiceTag under ServerStorage? Is it a billboardGUI or a surfaceGUI

local vcs = game:GetService("VoiceChatService")
local player = game.Players.LocalPlayer
if vcs:IsVoiceEnabledForUserIdAsync(player.UserId) then
	print("Voice chat enabled.")
else
	print("Voice chat disabled.")
end

This is working in a local script on my end.

1 Like

Screenshot 2021-11-09 at 22.58.16