Player Input Is Being Filtered Without Reason

Hello,

I am developing a tower game on Roblox where players need to submit valid words using specific letters to the server. When they submit a valid word, their tower grows.

However, I’ve encountered a problem: when players submit words frequently, Roblox seems to flag this behavior as spamming. As a result, Roblox filters all subsequent words from the player, even if they are appropriate. This issue is significantly impacting the gameplay experience.

Here there is the code:

local AllowedWords = {}
function ResponsesManager.FilterWord(WordToFilter: string)
	WordToFilter = string.lower(WordToFilter)
	if table.find(AllowedWords, WordToFilter) then return false end
	local Success_1, Result: TextFilterResult = pcall(function()
		return TextService:FilterStringAsync(WordToFilter, 1) -- ignore the 1 it already fixed
	end)
	if Success_1 then
		local Success_2, FilteredWord = pcall(function()
			return Result:GetNonChatStringForBroadcastAsync()
		end)
		if Success_2 then
			print(WordToFilter, FilteredWord)
			local IsFiltered = WordToFilter ~= FilteredWord
			if not IsFiltered then table.insert(AllowedWords, WordToFilter) end
			return IsFiltered
		else
			warn("Error while trying to get filtered text of a TextFilterResult: "..FilteredWord)
			return true
		end
	else
		warn("Error while trying to get TextFilterResult: "..Result)
		return true
	end
end

Thank you everyone!
Remember this is NOT a chat system or something like that

can someone help me pls, i really need a solution :sob:

What if you make a textbox for a player to input text? You could use remotes to send text from client to server with the textbox. (Why use Roblox chat?) If you want valid words, maybe make a list? People can put random letters into chat, this may seem like a word to your code, even if the text is not an actual word.

The problem is roblox thinking a player is spamming in a system that is not a chat, so they filter every word a player send, even if its appropiate.

Is there a way to filter words removing the antispam system?

Woah, you cannot modify the filter system in any way. (You MUST use Roblox’s filtering the way they set it up.) As I said, a textbox would be best, you can still filter it, but it wont have the spamming chat issue.

I think I did not explained too well, I will try to explain it better.

My game is about a player on the top of a tower and you need to send valid words to the server with certain letters. If the player send a valid word, the tower will grow, so the player can escape from the rising lava.

When the player send a word into a TextBox in my game, it fires the server.

When the server receive the word, the server filter the word and check if it’s valid.

The problem is when the player send too many words, Roblox will take it as spam. So, I just need a system to know if a word is inappropriate, not s system who protect a “chat” from spammers.