I need help issuing a mute to a player

So I have been having the issue where when I wish to mute a speaker (in this case for spamming the chat), the script doesn’t work at all.

Here is the code: (scroll)

	local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
	local channel = ChatService:GetChannel("All")
	local speaker = plr.Name

Before, I just sent a system message to the chat saying the player was muted, but now that won’t even work because of this.

I don’t really have anymore solutions

I dont know if this is related to the problem or not but you dont need two waitforchilds, once you use waitforchild the first time it already has gotten the object and theres no need to wait for a child of the child thats already loaded

Alrighty, let me see if that is the problem.