ChatService:FilterStringForBroadcast bug

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

i want to know why ChatService:FilterStringForBroadcast dont filter the string

  1. What is the issue? Include screenshots / videos if possible!

ChatService:FilterStringForBroadcast dont filter the string

if u want my scripts:

script:

function Translate(msg, plr)
	local Msg = tostring(ChatService:FilterStringForBroadcast(tostring(msg), plr))
	return Msg
end

a part from that script:

function PlayerMessage(player, msg)
	local Message = Translate(msg, player)
	Events.PlayerGlobalMessage:FireAllClients(string.format('['..tostring(player.Name)..']: %s',tostring(Message)))
end

I can’t do much with only snip-its from your script, I’m assuming most of your errors are going to come from outside of the designated script functions.

I mean can’t you call everything in one function? Like this:

function PlayerMessage(player, msg)
	local Msg = ChatService:FilterStringForBroadcast(msg, player)
	Events.PlayerGlobalMessage:FireAllClients(string.format('['..tostring(player.Name)..']: %s',tostring(Msg)))
end

But why it dont filter the string?

I mean I don’t know from where you are reading the message that player has inputed.

1 Like

FilterStringForBroadcast doesn’t filter strings in studio for specific reasons.

1 Like