Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you remove a player's ability to chat via the text box inside of the chat bar? [ANSWERED]

So, I'm making an admin script, and I'm trying to mute someone. I can't seem to do it, but here's a command for example:

Commands.speed = function(Sender,Arguments)
	local Argument = PartialMatch(Arguments[1]);
	if not Argument then return false end;
	Argument.Character.Humanoid.WalkSpeed = Arguments[2]
end

How could I mute someone without destroying the script, because I still need it for the unmute command?

1 answer

✓ Accepted answer

To mute someone, you need to use a LocalScript.

game.StarterGui:SetCore("ChatBarEnabled",false)

Learn more about SetCore

View post for muting someone via server script

Okay, fine. Here's the code you want.

local ChatService = require(game.ServerScriptService.ChatServiceRunner.ChatService)
local Channel = ChatService:GetChannel("ALL")
Channel:MuteSpeaker(string.lower(Argument.Name)) end

This discussion is preserved as it was. New answers, comments, and votes are closed.