Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to Filter a Message that was created with Admin?

Hi, so I have an admin script and if someone is admin they can do msg/hi, which creates a normal Instance.new("Message", workspace) and it's not filtered. I read the wiki on Text Filtering, but I do not get what they are trying to say. Can someone break it down for me? Thanks.

2 comments

0

This question is a little broad, can you go into more depth as to what you want to know?

0

Makes sense to me. I just don't like this question due to the lack of an attempt. If the wiki wasn't helpful, there are other tutorials, along with youtube videos explaining how to filter text.

1 answer

You really need to read the wiki. If it's hard to understand, you can just copy and paste it.

local TextService = game:GetService("TextService")
local filteredText = ""
local success, errorMessage = pcall(function()
	filteredTextResult = TextService:FilterStringAsync(text, fromPlayerId) -- Filter text
end)
if not success then
	warn("Error filtering text:", text, ":", errorMessage) -- Handle error
	-- Put code here to handle filter failure
end

Is what they showed on the wiki. Seems simple enough. make 'text' the item you want to filter? You really only need 1 line, but the rest is here just for things such as failure to filter. Don't want stuff showing up if it can't be filtered do we?

1 comment

0

Now what will him say about my answer ;-;

This discussion is preserved as it was. New answers, comments, and votes are closed.