I’m currently making a game where players can communicate with an AI, and the AI’s response is displayed on a surface GUI and is visible to the whole server. I need to filter the AI’s response, however, FilterStringAsync requires the user ID of the text’s author, but since the text is generated from an external source, it has no in-game author, meaning I can’t get a user ID.
So far I’ve tried using the ID of the player who prompted the AI, but I’m not sure if this is the proper way to do this. Is there a better way to go about filtering the AI’s response?
Either filter the string in an appropriate manner for all users(there’s a function for that, may result to extra tags than needed for 13+ users) or filter the string based on who is asking for it(for example if player A wants it on their copy of the surface gui, make them send a request to the server to receive a filtered result based on their user id). I answered a similar topic a while back: