Okay, so im trying to use a Custom Chat i found.. (Ofcourse im going to edit it..) But first im trying to make it works with FilterStringAsync.. But when i try it it gives errors and stuff ;-; tried to look up a custom chat with FilterStringAsync but couldnt really find one :/
Please help me with this
01 | local chats = script.Parent.Chats |
02 | local last |
03 |
04 | function newChat(msg,plr) |
05 | if #msg > 0 then |
06 | for i, c in pairs (chats:GetChildren()) do |
07 | c.Position = c.Position - UDim 2. new( 0 , 0 , 0.1 , 0 ) |
08 | end |
09 | local newMessage = script.Message:clone() |
10 | if #chats:GetChildren() = = 10 then |
11 | chats:GetChildren() [ 1 ] :Destroy() |
12 | end |
13 |
14 | if plr.Name = = "" then |
15 | newMessage.TextColor 3 = script.Owner.Value |
Try adding this the newChat
function, but as a side note, FilterStringForBroadcast
only works on Servers
1 | local chatservice = game:GetService( "Chat" ) |
2 | local newmessage = chatservice:FilterStringForBroadcast(msg, plr) |
Then change msg
to newmessage
OR
You can wait until the message is filtered, since the custom chat your using is using the Chatted
event. So you could add:
1 | wait(. 1 ) |
Or any other number you want.