I want to filter my text
When I filter my text it shows it for like 1 second then filters it.
What it does after 0.4 second
Before 0.4 second
I have tried roblox.com with my friends.
I am trying to make my own message command to filter but when it filters it just shows it my code fires a remote event and function to filter the text. It has like a 0.4 second delay before filtering the message.
--// LocalScript
local TextService = game:GetService("TextService")
local Player = game:GetService("Players").LocalPlayer
local FilterText = game.Workspace.AdminFolder.FilterText
local SetText = game.Workspace.AdminFolder.SetText
local filtered = FilterText:InvokeServer(script.Parent.Text)
script.Parent.Text = filtered
SetText:FireServer(filtered)
--//ServerScript
local TextService = game:GetService("TextService")
local FilterText = script.Parent.FilterText
local SetText = script.Parent.SetText
FilterText.OnServerInvoke = function(player,filteredText)
print("Function")
local filteredTextResult = TextService:FilterStringAsync(filteredText,player.UserId)
return filteredTextResult:GetNonChatStringForBroadcastAsync()
end
SetText.OnServerEvent:Connect(function(player,newText)
print("Remote")
script.Parent.LocalCodeExecutor.MessageGui.BackgroundFrame.Message.Text = newText
end)