Text filtering outputs "Instance"

So I have been working on a script that basically takes a message sent from client, filters it on the server and then it fires it back to all clients. However, instead of filtered message, I am getting nothing but “Instance”. Any help would be very appreciated.

The server script:

game.ReplicatedStorage.AnnounceMessage.OnServerEvent:Connect(function(plr, MC)
	local TextService = game:GetService("TextService")
	local filteredTextResult = TextService:FilterStringAsync(MC, plr.UserId)
	local Message = tostring(filteredTextResult)

FilterStringAsync returns a TextFilterResult which has the following methods for retrieving the filtered string:

Well, how exactly is that used in the script?

Replace tostring(filteredTextResult) with filteredTextResult:GetNonChatStringForBroadcastAsync(). Also filtering wont function in studio(to see tags you must test it inside a live server).

1 Like