speaker:SetMainChannel does not work

so im working on a round system where dead players cannot speak to living players, but dead players can see the chat of living players. the problem is, this line is problematic:

speaker:SetMainChannel("Dead")

even though im setting the main channel to “Dead” it returns this error:

  17:03:13.011  Players.nuttolum.PlayerScripts.ChatScript.ChatMain.ChatWindow:540: Channel 'All' does not exist.  -  Client - ChatWindow:540
  17:03:13.011  Stack Begin  -  Studio
  17:03:13.011  Script 'Players.nuttolum.PlayerScripts.ChatScript.ChatMain.ChatWindow', Line 540 - function SwitchCurrentChannel  -  Studio - ChatWindow:540
  17:03:13.011  Script 'Players.nuttolum.PlayerScripts.ChatScript.ChatMain', Line 620 - function DoSwitchCurrentChannel  -  Studio - ChatMain:620
  17:03:13.011  Script 'Players.nuttolum.PlayerScripts.ChatScript.ChatMain', Line 895  -  Studio - ChatMain:895
  17:03:13.011  Stack End  -  Studio

no, i have not deleted the “All” channel
yes, i have tried to create it, it said it already exists
ive found a few threads having similar issues, but none with a solution. i was tempted to post this as a bug report but im not confident enough in myself to rule out a stupid mistake

You’ll need to call AddChannel("All") first through the “ChatService” service.

local cs = game:GetService("Chat")
local channel = cs:AddChannel("All")
local speaker = channel:AddSpeaker("Name")
speaker:JoinChannel("All")
1 Like

this doesn’t work for me, i already tried it

should i move this to bug reports?

i had to use a workaround. anyone having this issue please see this:

1 Like