Need help with text filtering

I’ve run into this issue where strings are not filtered properly, I’ve read several posts and even studied the docs to be sure I am not doing anything wrong, but I dont think I do.

local textService = game:GetService("TextService")

local function createLobby(player:Player, lobbyName:string)

	lobbyName = lobbyName or player.DisplayName.."'s lobby"
	
	local success, result:TextFilterResult = pcall(function()
		return textService:FilterStringAsync(lobbyName, player.UserId, Enum.TextFilterContext.PublicChat)
	end)
	
	lobbyName = result:GetNonChatStringForBroadcastAsync(player.UserId)
	print(lobbyName)
end

I dont get any errors from the pcall or anything, and the returned instance IS the textFilterResult, but it doesn’t filter the text at all no matter how cursed words I input in. Any help will be appreciated!

Pretty sure messages do not get filtered running a game in studio but do get filtered when in game.

1 Like

I’ll try it, but there is nothing about it in the documentation.

Try to use the Text Filtering service API

1 Like

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