- What do you want to achieve? Keep it simple and clear!
Hello, I am trying to make a filter-check button that checks if the text input inside a Textbox is filtered by using text services and remote functions.
- What is the issue? Include screenshots / videos if possible!
I always get this error:
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked over other posts but none of the solutions helped me fix this issue.
Code:
Client:
local GetFilteredMessage = ReplicatedStorage.Remotes:WaitForChild("GetFilteredMessage");
local filter = GetFilteredMessage:InvokeServer(Note.TextBox.Text, localplayer.UserId);
if filter then
Note.Preview.Text = filter;
Note.Preview.TextColor3 = Color3.fromRGB(80, 140, 80);
else
Note.Preview.Text = "Filtering failed.";
Note.Preview.TextColor3 = Color3.fromRGB(140, 40, 40);
end;
Server:
local GetFilteredMessage = ReplicatedStorage.Remotes.GetFilteredMessage
local function FilterMessage(Message, PlayerID)
local filterResult = ""
filterResult = TextService:FilterStringAsync(Message, PlayerID):GetNonChatStringForBroadcastAsync()
return filterResult
end
Note: Please let me know if you need any other information.