Help with TextService:FilterStringAsync

Firing to the remote:

receiving the remote:

no matter what I put, bad word or a normal word, it only prints “instance”

2 Likes

(post deleted by author) ᅟ ᅟ ᅟ

2 Likes

So this is related to what I’m making at the moment:
https://gyazo.com/1b4907ad5b7e85dbbc03584f81bd33b0
I kind of think I should use broadcast. so should it be

local fullstring = filteredChat:GetChatForBroadcastAsync(message)
print(fullstring)

?

(post deleted by author) ᅟ ᅟ ᅟ

1 Like

I’m pretty sure that you can’t view chatservice filtered text in studio. If you go in-game and do “/console” in chat, you should be able to see the filtered state of the text.

This applies to all filtering methods I believe.

1 Like

Hmm… sorry for bothering you and I hope it’d be the last one :sweat:

current script

Localscript

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.RemoteEvent:FireServer("bad word")
end)

Server script

local TextService = game:GetService("TextService")

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr, message)
local filteredChat = TextService:FilterStringAsync(message, plr.UserId)
local fullstring = filteredChat:GetChatForBroadcastAsync()
print(fullstring)
end)

on studio, it gave me an error so I decided to move onto the real game:

same error in game:

1 Like

(post deleted by author) ᅟ ᅟ ᅟ

1 Like

yeesh… roblox and its errors…
and thats my bad I should’ve double checked the article before replying…
Anyway, now I’m getting a new error :sob:

(post deleted by author) ᅟ ᅟ ᅟ


https://gyazo.com/c937356dde7225fa97c0cbf0571d9f95

(post deleted by author) ᅟ ᅟ ᅟ

1 Like

Yeesh… I’m dumb I really need a habit of proof-reading.
Thank you its now working perfectly :heart:!!
(console prints ####) which is what it was supposed to!

1 Like

Make sure to put it in a pcall in case it doesn’t work.
Check https://developer.roblox.com/en-us/articles/Text-and-Chat-Filtering (Example 2) for more info.