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

:FilterStringForBroadcast() not changing anything about the string?

I'm making a proximity chat in my game. I have a GUI completely working, except for the filtering. I'm using :FilterStringForBroadcast() to filter the text, but it changes nothing. I can still say anything without it filtering. Does anyone know what my issue is? Here's my code, thanks in advance.

remotes.AddChat.OnServerEvent:Connect(function(plr,chat)
	if chat ~= nil and chat ~= "" then
		for i,v in pairs(workspace:GetChildren()) do
			if v:IsA("Model") and players:FindFirstChild(v.Name) and (v.HumanoidRootPart.Position - plr.Character.HumanoidRootPart.Position).magnitude <= 15 then
				local target = players:FindFirstChild(v.Name)
				local fixedChat = game:GetService("Chat"):FilterStringForBroadcast(chat,plr)
				remotes.AddChat:FireClient(players:FindFirstChild(v.Name),fixedChat,v.Name,v.Head.Overhead.NameLabel.TextColor3)
			end
		end
	end
end)

1 answer

if game:GetService('RunService'):IsStudio() returns true for ya then it makes sense, filtering does not work in the studio, try publishing the place, joining it and then typing something like 69 and stuff, it should work

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