Possible to change basically messages from the TextChatService?

I tried to change the message “You are now on the ‘%s’ team.” in the roblox chat, but it didn’t work for me. But if I use string.format, I get an error Argument #2. Here’s what I used:

function manager.Translate(language, method, textchat)
	TextChatService.OnIncomingMessage = function(textChatMessage)
		if textChatMessage.Metadata == "Roblox.Team.Success.NowInTeam" then
			if language == "en-us" and method == "Chat" then
			local properties = Instance.new("TextChatMessageProperties")
				properties.Text = "You are now on the '%s' team"
			return properties
			elseif language == "ru-ru" and method == "Chat" then
				local properties = Instance.new("TextChatMessageProperties")
				properties.Text = "You are now on the '%s'"
				return properties
			end
		end
	end
end
2 Likes

I didn’t know if that will work because i doesn’t know that befor so but i thing try:

function manager.Translate(language, method, textchat)
TextChatService.OnIncomingMessage = function(textChatMessage)
if textChatMessage.Metadata == “Roblox.Team.Success.NowInTeam” then
if language == “en-us” and method == “Chat” then
local properties = Instance.new(“TextChatMessageProperties”)
properties.Text = “You are now on the ‘%s’ team”
elseif language == “ru-ru” and method == “Chat” then
local properties = Instance.new(“TextChatMessageProperties”)
properties.Text = “You are now on the ‘%s’”
end
end
end
return properties
end

But i dont know if that works, i thing it wont work but try it?

Also try just to put the return properties some where else also between the last and the least last end ?