So I have this text filtering script and ive set it up so two different functions make the text into a textobject and then into a string. It fails in the first function and I suspect that
textobject = TextService:FilterStringAsync(summary,players)
Is the error as the game prints "filtering 2"
Full function:
local success, message = pcall(function() print ("filtering 2") textobject = TextService:FilterStringAsync(summary,players) end)
Full script:
local function Filter() wait(1) print("filtering text") TextService = game:GetService("TextService") local summary = game.ReplicatedStorage.Summary.Value local players = game.Players:GetChildren().UserId local success, message = pcall(function() print ("filtering 2") textobject = TextService:FilterStringAsync(summary,players) end) if message then print("broken") end if success then local worked, errorMessage = pcall(function() print("filtered") filteredtext = textobject:GetNonChatStringForBroadcastAsync() end) if worked then game.ReplicatedStorage.Summary.Value = filteredtext end end end game.ReplicatedStorage.Filter2.OnServerEvent:Connect(Filter)
The function Filter and success DO trigger, that isnt the problem. Thanks for any help!