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

How to prevent someone from chatting?

Asked by 8 years ago

title. This is all I've got:

player.Chatted:connect(function(msg)
    --somehow stop them from chatting
end

2 answers

Log in to vote
0
Answered by 8 years ago

Here is a link to the wiki article for SetCoreGuiEnabled(). This can be used in a local script to disable parts of the CoreGui interface. This however needs to be run from a localscript. I have used it before to disable parts of the CoreGui when a player enters (Like chat, and the health bar), but I don't believe it works if you run it in a LocalScript anytime while the player is in game.

-- LocalScript
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false);

This will disable roblox's core chat allowing you to completely script your own and if you make your own you can make it ignore players chats if the player is muted. This probably isn't what you're looking for, but I hope it helps.

Ad
Log in to vote
0
Answered by 8 years ago

If you mean only certain people can talk and not everyone do this..


local Talkers = {} function Chat(Player, Message) for i,Talker in pairs(Talkers) do if Player.Name == Talker then -- Things here end end end game.Players.PlayerAdded:connect(function(Player) local player = Player player.Chatted:connect(function(Message) Chat(player,Message) end end) for i,Player in pairs(game.Players:GetPlayers()) do local player = Player player.Chatted:connect(function(Message) Chat(player,Message) end end

Hope I helped! ;)

Answer this question