Text can't become filtered

I don’t know. I’ve been so frustrated by this, from the attempts I’ve been through, sometimes It didn’t output anything in the server, sometimes It didn’t filter the text whenever I put in bad words…

save me…

Client Script:

local textBox = script.Parent.TextBox

textBox.FocusLost:Connect(function()
	script.Parent.TextEvent:FireServer(textBox.Text)
end)

Server Script:

script.Parent.TextEvent.OnServerEvent:Connect(function(player, inputText)
	local success, filteredText = pcall(function()
		local result = game:GetService("TextService"):FilterStringAsync(inputText, player.UserId)
		return result:GetNonChatStringForBroadcastAsync()
	end)

	if success and filteredText then
		script.Parent.TextBox.Text = filteredText
	end
end)

Filtering strings doesn’t work in Studio. Consider trying in a live game server.

1 Like

Hi!

i’m just letting you know that Filtering wont work in studio,

see My string isn’t filtering, how do I fix this? - Help and Feedback / Scripting Support - Developer Forum | Roblox

This issue is common.

Text filtering | Documentation - Roblox Creator Hub
Have a good day!

1 Like

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