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.
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)