So I'm trying to make my own chat. I'm testing it by filtering the text inside a text box and printing the filtered result. When the result is printed all it says is "Instance". Here is the script

script.Parent.MouseButton1Click:Connect(function()
local TextService = game:GetService("TextService")
local success, errorMessage = pcall(function()
		local filteredTextResult = TextService:FilterStringAsync(script.Parent.Parent.TextBox.Text, script.Parent.Parent.Parent.Parent.Parent.UserId)

		print(filteredTextResult)
		
	
	end)
	
if not success then
	warn("Could not filter:", script.Parent.Parent.TextBox.Text, "because", errorMessage)
	
	end
	end)

Someone please help!

1 comment

0

It prints instance because the function returns Instance, TextFilterResult, it has methods that can you get you what you need, one of them is shown in code here https://developer.roblox.com/en-us/api-reference/function/TextService/FilterStringAsync