#Use FilterStringAsync() without player connected to current server

1 messages · Page 1 of 1 (latest)

willow heath
#

I am trying to make a global chat, which obviously has to be censored. The way I have it is when the message is received it then censors it on the server but FilterStringAsync requires the player to be in the current server. Is there a workaround

fast sluice
willow heath
#

that wont work because 1: the message isn't filtered when I send it using messaging service meaning I have to run FilterStringAsync to filter it, which gives an error because the player is not in server and 2: Although it does get filtered when a player sends it, it can be abused by simply firing the remote event with any text they want

fast sluice
#

you intercept message

#

when typed in normal chat

#

if u do that, then no need for filter iirc

#

but if u use custom ui with remotes

#

then u filter on server obv

#

and when u recieve it, and display thro text channel SendASync, i believe roblox will filter it based on players age etc

#

(the one that sees it)

willow heath
#

k ill give it a try and get back to you

hardy pebble
#

You have to filter messages on the server where the sender is, using their player object. Then send the already filtered text to other servers via MessagingService or MemoryStore. That way everyone sees a safe version.

willow heath
#

I figured it out. I had to do what @hardy pebble said and filtered it with GetNonChatStringForBroadcastAsync() so it is safe for everyone. I tried to use the SendAsync but it wouldn't work because sendAsync sends a message with local script as the player. This means that everyone would repeat what one said