Will I get into trouble for making my own text/string filter?

Hey developers,

I noticed that if a user changes the text in a TextBox, it doesn’t get filtered. This means I have to make my own filtering system.

However, my main concern is typing strings such that are normally filtered by roblox into a table. (The table being the thing looped through to see if the inputted string is inappropriate).

Will I get into some sort of trouble for making my own filtering table?

You need to apply text filtering via TextService:FilterStringAsync(). Do not make your own filtering, Roblox’s is much more advanced and required for public user content.

Here is a small sample that may be applicable to your use case, where remoteEventTextUpdate is the remote event you are using, and sign is a text object to be updated.

local TextService = game:GetService("TextService")

local function getFilteredText(message: string, fromPlayerId: number): string?
	local success, textMessage = pcall(TextService.FilterStringAsync, TextService, message, fromPlayerId)
	
	if success then
		return textMessage
	else
		warn("Couldn't filter text, try again")
		return nil
	end
end

remoteEventTextUpdated.OnClientEvent:Connect(function(player: Player, message)
	local filteredText = getFilteredText(message, player.UserId)
	if filteredText then
		sign.Text = filteredText
	end
end)
1 Like

There is no problem unless you make sure that the chat is filtered very well

Appreciate your response! I’ve never heard/seen this module before, so thank you for showing it to me.

You can say that again.

There is, because players can constantly find bypasses to your system. Roblox can find solutions quicker and you don’t need to update your game for that to happen. Roblox will only be happy if you use their filtering, when filtering user generated strings. I hope if you’re filtering, you’re at least use roblox’s on top of your own?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.