Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a Staff Channel Work in game?

Asked by 3 years ago
Edited 3 years ago

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?

0
you cant get player with a variable, use CalledMetatable 0 — 3y
0
you cant get player with a variable, use game:GetService('Players').PlayerAdded:Connect(function(plr) --Your Code end) CalledMetatable 0 — 3y
0
The group id code? stay123s -5 — 3y

Answer this question