Hide messages in chat

I want to be able to send messages (maybe to do a private notify or a server message) without letting other players see the actual message " ;serverMessage text " (using hd admin)

The issue is that i dont know how to make it possible, and i would really like to understand how and if its possible.

I tryed to look for any information to do this online but got nothing, another solution could be to remove the chat, but to have it enabled only for admin, so he can use the commands and see the chat (i would just prefer to hide the admin messages) (i know how to remove it for all players but its useless as of now)

1 Like

I don’t believe there’s an actual way to do that other than to create your own chat.
You can also ping System /w System or something tho creating your own chat system gives you full control over it (if you’re going that way, DON’T FORGET TO FILTER MESSAGES with

local TextService = game:GetService("TextService")

local filteredText = ""
local success, errorMessage = pcall(function()
	filteredTextResult = TextService:FilterStringAsync(text, fromPlayerId)
end)
if not success then
	warn("Error filtering text:", text, ":", errorMessage)
	-- Put code here to handle filter failure
end

Chat.RegisterChatCallback maybe?

Set message.ShouldDeliver to false in order to cancel delivery of the message to players (useful for implementing a chat exclusion list)

how would i use it exaclty? bc its some motnhs im not touching roblox studio and i quickly hopped to make a dungeon & dragons private game for me and my friends like 3 days ago, and im mostly done (just need some things ik how to do and this chat problem to be solved)

i was able to make a script in the past minutes before reading your message, il just try it out now and see if it work, then if not imma try with your and tell if i got something working or not

ok so i tryed doing something with a script in ServerScriptService + a fireEvent and it was not working
then i made this (trying to use the function u suggested) and i got no errors but nothing working