I want to add a channel to the Roblox chat called “MyChannel” that players can /join and /leave. Despite adding the channel, I cannot join it by typing /join MyChannel. I have tried assigning its ChatChannel.AutoJoin and ChatChannel.Joinable to true, but this does not solve the issue.
Is there anything I’m missing? Here’s my Script inside ServerScriptService (the only enabled Script I’ve created):
local chatServiceModule = require(game:GetService("Chat"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local channel = chatServiceModule:AddChannel("MyChannel")
print(channel.Joinable) --> true
The issue occurred because I was requireing the ChatServiceRunner.ChatService parented to Chat. To use ChatService, you instead need to require the ChatServiceRunner.ChatService parented to ServerScriptService.
The chat script doesn’t slow down or error when the filter does. The error message only pertains to filters not working as expected. This is quite evident in the manner that, despite messages not appearing, the chat flow still retains its accuracy. Using the AddChannel API has nothing to do with slow filters, it’ll work just fine.
I wasn’t asking about the Filter it doesn’t have anything to do with slowing down the script, I’m asking the problem with the Script, sometimes it still gives out that Error when using it too soon as the Chat Service script still needs to runs
I’m not too familiar with the chat system. Could this code work?
local isSuccessful, channel = pcall(chatService.GetChannel, chatService, "All")
if not isSuccessful then
repeat until chatService.ChannelAdded:Wait() == "All"
channel = chatService:GetChannel("All")
end
It’s probably a good idea to create your own support post if you’re having a separate problem.
That’s not a slowed script. That’s just the script not loading. I am quite sure that the modules are loaded immediately after they are added. If this isn’t the case, wrap your functions in protected mode and go until they return a success.