I'm trying to make a filter message for broadcast thing so people don't swear in a draw game I'm making, I use this code:
game.Players.LocalPlayer.Chatted:connect(function(msg) local filter = game.Chat:FilterStringForBroadcast(msg) print(filter) end)
I don't know if i did something wrong but it says:
04:35:42 -- Argument 2 missing or nil 04:35:42 -- Stack Begin 04:35:42 -- Script 'Players.SaosAccount.PlayerGui.LocalScript', Line 2 04:35:42 -- Stack End
I just need help
You are missing the second parameter on line 2, which would be the player that sent the message.
--Sorry for no indentation, I am writing via phone
local Player = game:GetService("Players").LocalPlayer Player.Chatted:Connect(function(msg) local filter = game.Chat:FilterStringForBroadcast (msg, Player) print(filter) end)