Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Text Filtering Problem | The output says 'filteredText' is an instance??

So I am currently trying to filter text from a surface gui.

filteredText = TextService:FilterStringAsync(script.Parent.Screen.Info.Text, game.Players.N43FGXL.UserId)

When I print 'filteredText' it is Instance. When I try setting my text to 'filteredText' it doesn't work (obviously because its class is an instance).

Why is this? How do I get the filtered text?

In advance, thanks.

1 answer

Hello, N43FGXL. The problem is that you did not use the :GetChatForUserAsync() function. It will make the filtered string instance a string. Try this:

local userId = game:GetService("Players").N43FGXL.UserId

filteredText = TextService:FilterStringAsync(script.Parent.Screen.Info.Text, userId):GetChatForUserAsync(userId)

1 comment

0

When I do this and I enter profane words, those words are just returned to me when I do print(filteredText)

This discussion is preserved as it was. New answers, comments, and votes are closed.