"ChatServiceRunner is not a valid member of ServerScriptService"

Recently I decided to try and experiment with the chat API to create things like separate channels for things like server messages, general chat, etc. However upon attempting to try and create a channel I get the following error:

ChatServiceRunner is not a valid member of ServerScriptService

The code is only two lines, requiring the script and then creating a channel with it.

ChatService = require(game:GetService('ServerScriptService').ChatServiceRunner.ChatService
local testchannel = ChatService:AddChannel('Test')

This is a server-side script, and i’ve checked on the server to see if ChatServiceRunner even exists in the location (and yes it does), so I am completely stuck as to how this could be occuring.

4 Likes

You’ll need to Instance:WaitForChild as ChatServiceRunner is not parented to ServerScriptService immediately:

ChatService = require(game:GetService('ServerScriptService'):WaitForChild('ChatServiceRunner').ChatService)
local testchannel = ChatService:AddChannel("Test")
9 Likes

Thank you so much! Is there a way to get the channel to display on the Core GUI or do I need to implement a custom solution?

1 Like

You should make a new thread for a separate topic. We’ll help you over there. :slight_smile:

Check out the ShowChannelsBar setting in the ChatSettings module. Run the game and copy ClientChatModules from Chat to change this. You can then remove everything but the ChatSettings file.

4 Likes