First, to be clear. I'm not asking for a full script. I am trying to make my own custom admin commands, so far making an admin command bar hasn't worked out so I was thinking, why not just remove the messages from chat.

My current script for checking for admin commands is the following -

game.Players.PlayerAdded:Connect(function(player) 
	player.Chatted:Connect(function(message,recipient)
		if isAdmin(player) then -- This refers to a function that checks if the player is an admin
			message = string.lower(message)
			
			local splitString = message:split(" ") 
			
			local slashCommand = splitString[1]
			
			local cmd = slashCommand:split(prefix)
			
			local cmdName = cmd[2]
-- Here upwards is spliting the message into different variables
			
			if commands[cmdName] then -- commands refers to a table that is defined
				
				local arguments = {} 
				
				for i = 2, #splitString, 1 do
					table.insert(arguments, splitString[i]) -- Adds the arguments into the arguments table which is sent to the command functions later
				end
				
				commands[cmdName](player, arguments) -- This fires the commands
				
			end
		end
	end)
end)

So I was wondering if there was a way to remove or hide the message somewhere in my current script. If there is how would I add it?

I'm fairly new to scripting so please work with me while I try to learn.