Filter String within studio (plugin development) (TOS issue?)

Hey developers! Basically I have a random string generator, and because its random, filtering out the bad ones is nice. However there is no user that is tied to the random string generator… So How can I filter a string without a userID? (Since TextService:FilterStringAsync() requires a UserID argument)

Any help is much appreciated !

Edit: Turns out you can’t use TextService:FilterStringAsync() in studio, but I need to use something like it, as I’m making a public plugin. Which as the creator, I am technically I’m responsible as the creator of the plugin of what my random string generates. Since I also take User input to, I need some sort of filter

22 Likes

You can send a remote event with local script and then you have the player as argument on server which you can use to get their UserID

6 Likes

Can’t really call remote events because in my case, it is running on a server plugin script. And again, its not user generated, meaning that the player didn’t make them

6 Likes

Can’t you just set the UserID to 1 and call it a day?

5 Likes

I mean I can try, but I assume not from the roblox docs:


From Roblox docs:
“This method currently throws if fromUserId is not online on the current server. We plan to support users who are offline or on a different server in the future”

6 Likes

Well that sucks.
Maybe what you could do is grab a random player in the server and use their UserID?

The thing is that I think <13 users get more filtering when their UserID is used, so maybe try to find a >13 player if possible, otherwise just grab an <13 player?
Though I don’t remember if it’s possible to get if somebody is >13 or not.

5 Likes

My only question with that is Does this count against the player is it filters out a bad result? Like for example lets say my random string generate filtered a bad result. Is this added into a log that a roblox moderator sees against that user, out of context? Not understanding that it wasn’t User generated, If that makes sense?

3 Likes

I don’t think they do this, to prevent abuse.
If you really wanted to, you could try making it filter some pretty harsh stuff on an alt.

I really don’t believe this is the case though, as-in I don’t believe it counts towards moderation.
People would probably seriously abuse it like they did with spoofing/misfiring chatting events to get people banned.

5 Likes

What are you gonna use this string for? Are you displaying it to other users?

4 Likes

Displaying it to other developers for a plugin

4 Likes

Can u like get the player this way? Using StudioService:

local playerId = game:GetService("StudioService"):GetUserId()

Then you’ll have the UserID to filter the text.

1 Like

Yes and I already have something like that in my script.

It just is silly to me to connect the user using the plugin to the filter result considering its not generated from them

Since the roblox docs mentions that you can filter:

"Random Words - If your experience generates words from random characters and displays them to users, there is a chance that it creates inappropriate words. "

3 Likes

I don’t think it is possible to filter text without a UserId.

3 Likes

So Uh new issue. It won’t filter out bad results? Because its studio and chat filters don’t work in studio and I forgot about that… so Uh how do I go about this new found issue :no_mouth:

2 Likes

Oh yeah, I totally forgot to mention that.

I remember swearing in Roblox Studio and got scared for my account.

2 Likes

Well yea, but the plan is to make this plugin public, meaning that I kinda need a way to filter out results because technically I’m responsible as the creator of the plugin

3 Likes

Lemme research and try to find if there’s any way to filter text in Studio.

3 Likes

Apparently, you can’t use the function at all.

3 Likes

Well like. It won’t filter at all. I used the output and put in the test string what should be a filter result and it printed without filtered. No errors were outputed because the user was connected to the server as a studio user (aka myself)

3 Likes

Did you like play the game while using the command?

2 Likes