I am trying to make a chat message not show up. For example if I type “/fakedonate” then that message will not show up in chat. All help is much appreciated!
There seems to be a similar topic about this. Try reading the Solution and see if it helps:
I have already tried this and it does not seem to work.
How about using the OnIncomingMessage
event for TextChatService
to detect the message you want to hide? Something like:
local ChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
ChatService.OnIncomingMessage = function(message: TextChatMessage)
local property = Instance.new("TextChatMessageProperties")
if message.Text == “/fakedonate” then
property.Text = “” -- Returns a blank message.
else
property.Text = message.Text -- Sends original message.
end
return properties
end
I am not sure what to put here where the error is. Should it just be property?
I change it to property and it did not do anything
You would have to tell the TextSource
that it cannot send any messages using the Property CanSend
, this property when set to false
will prevent chat messages from being sent to other players, however it will still appear for other players, so you would have to remove the content from the TextChatMessage
, or rewrite the message to say they cannot send any messages.
Within the TextChatMessage
Instance
, you are able to access the TextSource
This has to be done on the Server, otherwise it will still send the Message.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.