My chat won't work because it needs a chat filter, but everything I try it fails
local msg = game.Chat:FilterStringForBroadcast(message)
This returns nil There is a secret way to filter? EDIT:
--This is the script what works local suc, errormsg = pcall(function() int2.Name = plr.Name.." is now Joined!!!" end) if suc then print("Success!") else warn("Fail, " .. errormsg) end plr.Chatted:Connect(function(msg) local int = script.Parent.Chats local int2 = Instance.new("StringValue", int) local msg2 = string.upper(msg:sub(0, 1))..msg:sub(2) local biztositek = string.len(msg2) local biztositek2 = "." if string.sub(msg2, biztositek) == "!" or string.sub(msg2, biztositek) == "?" then biztositek2 = "" end local suc, errormsg = pcall(function() int2.Name = plr.Name..": "..msg2..biztositek2 int2.Value = biztositek end) if suc then print("Success!") else warn("Fail, " .. errormsg) end end) end) game.Players.PlayerRemoving:Connect(function(plr) wait(1) local int = script.Parent.Chats local int2 = Instance.new("StringValue", int) local suc, errormsg = pcall(function() int2.Name = plr.Name.." is now Left." end) if suc then print("Success!") else warn("Fail, " .. errormsg) end end)
It returns nil because there is nothing in (message)
you need to use Player.Chatted
event then connect it to a function
,the parameter would be what the player is saying
,use the parameter from player.chatted and put it in
,Chat:FilterStringForBroadcast(chat parameter)