#FilterStringAsync

1 messages · Page 1 of 1 (latest)

thick dawn
#

So stupid to ask. I know. Anyway, I tried to use TextService FilterStringAsync and it's not working properly. I'm using a serverscript. After a RemoteEvent fires, it takes two arguments, Player, String. After that, I will try to use FilterStringAsync on the string. Then, I use GetNonChatStringForUserAsync. Boom. Yeah. Wish it was that easy. Doesn't look like it's hashtags. Stays exactly the same string. Is this method outdated, or am I missing something here? I don't see a lot of information on this. Thank you if you can help with this. The string I'm filtering is a TextBox Text. After the filter, I will then send the filtered string to the client and set the TextBox Text to it. I found out that doesn't work because it stays exactly the same. Sorry for all the words. TLDR, FilterStringAsync might be outdated, or I'm using it wrong. Dunno.

spare stone
# thick dawn So stupid to ask. I know. Anyway, I tried to use TextService FilterStringAsync a...

It’s not outdated, you’re just using it a little wrong.

FilterStringAsync only changes the text if Roblox thinks it needs to be filtered.
If the text is clean, it will return the exact same string that’s normal.

Also make sure

You’re calling it on the server (not local)

You pass the player.UserId

You actually use the result from GetNonChatStringForUserAsync

Example of the correct flow:

local filtered = TextService:FilterStringAsync(text, player.UserId)
local result = filtered:GetNonChatStringForUserAsync(player.UserId)

If you test with something obviously bad and it still doesn’t change, then there’s an issue.
But if it stays the same with normal words, that just means it’s working.

spare stone
thick dawn
spare stone
#

are you that smart?

thick dawn
#

No. AI is just that dumb

#

GPT mostly builds off information from chatting with users, and ya know... the users are... not the sharpest

#

Anyway. Just skidded the code you sent. Unfortunately, did not work. I figured it wouldn't cause I've already tried it before lol

#

Not really sure what to do at this point.

spare stone
#

AI is stupid.

#

Since ai cant help you i will

spare stone
# thick dawn Not really sure what to do at this point.

If the code is right and it still doesn’t work, then one of these is 100% the problem:

• You’re testing in Studio — filtering barely works there
• The text you’re testing with doesn’t need filtering
• The RemoteEvent is sending the string wrong
• You’re not actually using the returned filtered result

Try this quick test:

local filtered = TextService:FilterStringAsync("badwordhere", player.UserId)
local result = filtered:GetNonChatStringForUserAsync(player.UserId)
print(result)

If that prints #### in a live game, then your system works and the issue is just how your text is being sent or tested.

If it still prints the same word in a live game, then something else in your script is blocking it.

Roblox filtering works — it’s just annoying to debug.

thick dawn
#

Yay

spare stone
#

Thank me later

thick dawn
spare stone
#

LOL

#

Thank me later buddy

#

Im a genuis

thick dawn
#

Lol

#

The next elon fucking musk over here

spare stone
#

My uncles fishes aunts step sisters young cousins mom was a scripter and developer of the website roblox

#

Its just in my genetics

thick dawn
#

Wow

spare stone
#

I have it In my DNA

#

Thank me later though.

#

Dont worry bro

#

You dont need to thank me later

thick dawn
#

Wiat

spare stone
#

Thank me in 2 years

thick dawn
thick dawn
thick dawn
#

Who needs help from aaron when we got danny

spare stone
#

@wraith tide

wraith tide
#

Pretty sure filtering text doesn't work in studio

thick dawn
#

is that so

wraith tide
#

U can dead ah swear in the chat

thick dawn
#

i wasted a whole hour 🎉

#

tada

spare stone
wraith tide
spare stone
#

check dms

#

dont worry

spare stone
#

we gonna help you bro

wraith tide
thick dawn
#

Alright

spare stone
thick dawn
#

Thanks for the heads up

thick dawn
spare stone
#

nah

#

i got u

#

dont worry

#

Alright, real talk — if it didn’t work even after trying that code, then it’s not the filter itself.

FilterStringAsync almost never “breaks”. When it fails, it’s usually because:

• The string isn’t actually reaching the server
• The player argument is nil or wrong
• The filtered result isn’t what you’re sending back
• Or you’re testing in Studio where filtering barely does anything

At this point, don’t change the filter code.
Instead, print everything step by step:

Print the text you receive

Print the player.UserId

Print the filtered result

If any of those don’t show correctly, that’s where the problem is.

Filtering itself is fine.
The issue is somewhere in the flow around it.

thick dawn
#

technically danny helped more cause he gave the code 🎉

#

fuck you aaron

#

danny goated

spare stone
#

LOL

#

did i actually?

thick dawn
#

no

spare stone
#

LOL

thick dawn
#

ur eel on musk

#

fuck you

spare stone
#

LMAO

spare stone
# thick dawn ur eel on musk

Alright bro, I get what you mean, Roblox filtering is honestly one of the most annoying things to deal with, so you’re not crazy for thinking something’s broken.

FilterStringAsync itself isn’t outdated and it definitely still works, but the thing is it only changes the text if Roblox thinks it actually needs to be filtered. If the text is clean, it will literally return the exact same string and look like it did nothing, which throws a lot of people off.

Another thing is testing in Studio. Filtering in Studio is really inconsistent and sometimes barely works at all. The real filtering happens in live servers, so if you’re testing everything inside Studio, it can make it seem like the function is broken when it’s not.

The other common issue is how the data is being passed. Even if your filtering code is correct, if the RemoteEvent isn’t sending the text properly or the player argument is wrong, the filter won’t work the way you expect. A lot of the time the problem isn’t the filter, it’s the flow of how the text gets to it.

Also make sure you’re actually using the result that comes back from the filter. The filter doesn’t change the original string automatically. You have to store the filtered result and use that instead. If you keep using the original text, it’ll obviously look like nothing happened.

If you want to really confirm everything, just do a simple test where you send something that should 100% get filtered, like obvious bad words, and print the result on the server. If it turns into hashtags in a live game, then your filter is working and the issue is somewhere else in your system.

#

Honestly, this isn’t about being smart or AI being dumb. Roblox just made their filtering system way more confusing than it needs to be, and almost everyone runs into this problem at some point. You’re not stuck because you don’t understand it, you’re stuck because the system itself is annoying to work with.

You’re definitely close to figuring it out, you just need to narrow down where the text is breaking between the textbox, the remote, and the filter. Once you find that point, it’ll make sense.

thick dawn
thick dawn
thick dawn
spare stone
# thick dawn Is this AI? Nope—just Danny's intellect. 🎉

All jokes aside, if this was AI… it would probably still be asking
“Did you try turning the filter off and on again?”

But nah — this is clearly Danny’s elite brainpower™ at work.
Roblox filters don’t stand a chance 🧠🔥

GTA 6 might drop before Roblox docs explain filtering properly anyway 🤝

thick dawn
#

Now how do i close a forum to save the embarassment of being right the whole time

#

Oh

#

There it is

#

Any last words danny

spare stone
thick dawn
#

W last words

spare stone
#

Yeah… just one thing.

I was right.

That’s it.
Carry on. 🎤🚶‍♂️

#

DAMN

#

AURA!

#

Yeah… just one thing.

I was right.

That’s it.
Carry on. 🎤🚶‍♂️

#

chatgpt

#

gave me so much aura bro

#

omgggg

finite pasture
#

How tf did we get here?

honest lynx
thick dawn
# honest lynx Just use ai

Lol it turns out i was never wrong and i found out it needs to be a published and actually in game instead of testing in studio

#

Pretty stupid but its whatever