Whenever I invoke this function, when I recieve the string from the server i just get the error attempt to call a string value twice.
Server Script:
function Filter() if game.ServerStorage.Summarizer.Value == "" then wait (16) end print ("2") local sumname = game.ServerStorage.Summarizer.Value local summarizer = game.Players[sumname].UserId local TextService = game:GetService("TextService") local filteredMessage = "" local summary = game.ReplicatedStorage.Summary.Value local success, errorMessage = pcall(function() local filteredMessage = TextService:FilterStringAsync(summary, summarizer):GetNonChatStringForBroadcastAsync() end) if success then return filteredMessage elseif errorMessage then print("Error filtering message:", errorMessage) end end game.ReplicatedStorage.Filter.OnServerInvoke = Filter()
Local Script:
function SetSummary() script.Parent.Text = game.ReplicatedStorage.Filter:InvokeServer() end game.ReplicatedStorage.OpenVoting.OnClientEvent:Connect(SetSummary)
Thanks in advance!