Hello Developer, I need your help to fix this to see what wrong with it as staff chat don't work in studio and it dose not work in game too please help me.
This is what I tired:
Script
``local plrs = game:GetService("Players") local sss = game:GetService("ServerScriptService")
local chatService= require (sss:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")``
local staffChannel = chatService:AddChannel ("Staff") staffChannel.Joinable = true staffChannel.AutoJoin = false chatService.SpeakerAdded:Connect(function(name) local plr = game.Players:FindFirstChild(name) if plr and plr: GetRankInGroup(9813281) >= 200 then local speaker = chatService:GetSpeaker(name) speaker:JoinChannel("Staff")
end)``
Local Script
local chat = game:GetService("Chat")
local chatModules = chat:WaitForChild("ClientChatfodules")
local chatSettings = require(chatModules:WaitForChild("ChatSettings"))
local chatWindow = require(chat:WaitForChild("ChatScript"):WaitForChild("ChatMain"):WaitForChild("ChatWindow")).near()
chatSettings.ShowChannelsBar = true chatSettings.EchomessagesInGeneralChannel = false
chatWindow:AddChannel("Staff")``
If you could help me that would be great thank you?