RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"FilterRE is a remote function. not remote event"
-- server script local remote = game.ReplicatedStorage.RemoteFunctions.FilterRF local textservice = game:GetService("TextService") remote.OnServerInvoke = function(player, message, TB) local success, filteredtext = pcall(function() return textservice:FilterStringAsync(message, player.UserId) end) if success then local result = filteredtext:GetChatForUserAsync(player.UserId) return result else warn("Failed to filter text: " .. filteredtext) end end -- client script local player = game:GetService("Players").LocalPlayer local textservice = game:GetService("TextService") local remote = game.ReplicatedStorage.RemoteFunctions.FilterRF script.Parent.FocusLost:Connect(function(enterPressed) local message = script.Parent.Text local TB = script.Parent local result = remote:InvokeServer(message, TB) script.Parent.Text = result end)