HELP Custom Chat with Filtering

ok so i follow all the guide and i think im ok but it still doesnt work :
the local script


and the server script

This is the problem:

Remove

Replace this with:

Event.OnServerEvent:Connect(onSendMessage)
1 Like

image

i got this error … :confused:

Replace this (Line 34 of main script):

Replace

Event:FireClient(player, filteredMessage)
1 Like

Also, add this to the start of the chat gui:

script:FindFirstAncestorOfClass("ScreenGui").Enabled = false
script:FindFirstAncestorOfClass("ScreenGui").Enabled = game:GetService("Chat"):CanUserChatAsync(game.Players.LocalPlayer.UserId)

This is required by Roblox as it respects parental controls.

1 Like

Sorry, you should replace this with (again another Roblox requirement):

if game:GetService("Chat"):CanUsersChatAsync(sender.UserId, player.UserId) then
Event:FireClient(player, filteredMessage)
end

This is so blocked players cannot chat with each other, Roblox prohibits blocked users chatting to each other…

1 Like

OKAY ! ITS WORK ! Thank you a lot man <3

1 Like