Custom Chat Message Filtering

I have been reading the documentation for TextService for a bit and am pretty confused on what I should actually do for my situation. I am making a custom chat and I have one question.

First of all what is the difference between GetChatForUserAsync and GetNonChatStringForUserAsync

Second, which method should I use for my custom chat? I do not understand why there are methods for non chat messages.

2 Likes

If it’s for a custom chat you’re obviously not going to use any of the bottom two, use the first one.

You should use TextFilterResult:GetChatForUserAsync if you are filtering Chat, otherwise use TextFilterResult:GetNonChatForUserAsync or TextFilterResult:GetNonChatStringForBroadcastAsync

So in the case of using the first one, would I have to loop through all the players and “FireClient” to them because it requires a userid argument?

Yeah you would do it like that, and that is how you are supposed to do it anyway.

What is the point of having the first one and GetNonChatStringForUserAsync if they seem to do the same thing

They don’t do the same thing. One is meant for chat, the others aren’t.

Well clearly by the name one is meant for chat yes, but what is the actual difference?

I imagine this one being a little lighter since it allows for some names.

Yeah I guess I will just have to mess with it thanks for the help though!

1 Like