Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont either of these functions ever trigger?

Asked by 5 years ago

Ive been working on a text filter script but I cant test it due to the functions never triggering.

If I look at scripts in the developer console the rate for the script spikes but activity remains at 0%

Script:


function Filter() print("2") local TextService = game:GetService("TextService") local sumname = game.ServerStorage.Summarizer.Value local summarizer = game.Players[sumname].UserId local filteredMessage = "" summary = game.ReplicatedStorage.Summary.Value success, errorMessage = pcall(function() text = TextService:FilterStringAsync(summary, summarizer) end) if success then return text elseif errorMessage then print("Error filtering message:", errorMessage) end end game.ReplicatedStorage.FilterEvent.OnServerEvent:Connect(Filter) function sendFiltered() wait (0.2) local TextService = game:GetService("TextService") local sumname = game.ServerStorage.Summarizer.Value local filteredMessage = "" success, errorMessage = pcall(function() filteredMessage = text:GetNonChatStringForBroadcastAsync() end) if success then game.ReplicatedStorage.FilteredSummary.Value = filteredMessage elseif errorMessage then print("Error filtering message:", errorMessage) end end game.ReplicatedStorage.FilterEvent.OnServerEvent:Connect(sendFiltered)

Thanks in advance!

0
Do you have a client actually firing the event? Vulkarin 581 — 5y
0
Yes ^ RexRicher 0 — 5y
0
Can we see the local script? mixgingengerina10 223 — 5y

Answer this question