Collapse Sidebar


Filters a string sent from playerFrom for broadcast to no particular target. The filtered message has more restrictions than Chat/FilterStringAsync.

Some examples of where this method could be used:

  • -Message walls
  • -Cross-server shouts
  • -User-created signs

Calling FilterString from LocalScripts is deprecated and will be disabled in the future. Text filtering should be done from server-side Scripts using FilterStringAsync.

Note: A game not using this filter function for custom chat or other user generated text may be subjected to moderation action.


Name Type Default Description

Message string being filtered

Instance of the player sending the message


Return Type Summary

Filtered message string

Code Samples


The following example shows a simple way to use the FilterStringForBroadcast function. The example uses the message variable as the stringToFilter argument and the local player as the playerFrom argument.

The example then prints the result of the filtering function, FilteredString.

local playerFrom = game.Players.LocalPlayer	-- Local player (player sending message)
local message = "Hello world!"	-- Message to be filtered

-- Filter the string and store the result in the 'FilteredString' variable
FilteredString = game:GetService("Chat"):FilterStringForBroadcast(message, playerFrom)

-- Print the filtered string