How to remove the "You are now on the X team" system message

Hey,

I am trying to remove the “You are now on the X team” without having a “1” bubble like this :
image

A method that worked but is not optimal is this one :

TextChatService.OnIncomingMessage = function(message: TextChatMessage)
	if message.Metadata == "Roblox.Team.Success.NowInTeam" then
		message.Status = Enum.TextChatMessageStatus.InvalidTextChannelPermissions
		return message
	end
end

It’s not optimal as it triggers an error : “Error occurred while calling TextChatService.OnIncomingMessage: OnIncomingMessage callback failed: Did not return TextChatMessageProperties instance”

I also tried using ShouldDeliverCallback, but it doesn’t seem to call it at all :

local SystemChannel: TextChannel = TextChatService:WaitForChild("TextChannels"):WaitForChild("RBXSystem")

SystemChannel.ShouldDeliverCallback = function(message, source)
	if message.Metadata == "Roblox.Team.Success.NowInTeam" then
		return false
	end
	return true
end

I was wondering if anyone knew any other method to do it as the team change message is annoying because my game changes team very often.

Thank you for any help :slightly_smiling_face:

message.Status does nothing, what is causing the message not to be sent is return message because in order for the message to go through, the function expects either a TextChatMessageProperties instance or nil. Another method to stop the team messages from going through is to destroy the system text channel once its added, but that will also cause some fake errors in the output.

1 Like

Yeah that’s also a workaround, but I still want the other system messages to be there. Like when a friend joins, so that would not work for me. I wonder if they ever thought of giving us the option to disable it directly as a TextChatService property.

Highly doubt it, your first solution is the best as far, because it also works on the client. Although you will have to see that annoying error on the output:

local RBXSystem = game.TextChatService.TextChannels:WaitForChild("RBXSystem")

RBXSystem.OnIncomingMessage = function(message: TextChatMessage)
	--if you return anything other than nil or message properties it wont show the message
	if message.Metadata == "Roblox.Team.Success.NowInTeam" then return true end
end
1 Like