diff --git a/Cmdr/BuiltInCommands/Admin/announceServer.lua b/Cmdr/BuiltInCommands/Admin/announceServer.lua index 38ba6a80..1b11a57a 100644 --- a/Cmdr/BuiltInCommands/Admin/announceServer.lua +++ b/Cmdr/BuiltInCommands/Admin/announceServer.lua @@ -1,12 +1,12 @@ +local TextChatService = game:GetService("TextChatService") local TextService = game:GetService("TextService") local Players = game:GetService("Players") -local Chat = game:GetService("Chat") return function(context, text) local filterResult = TextService:FilterStringAsync(text, context.Executor.UserId, Enum.TextFilterContext.PublicChat) for _, player in ipairs(Players:GetPlayers()) do - if Chat:CanUsersChatAsync(context.Executor.UserId, player.UserId) then + if TextChatService:CanUsersChatAsync(context.Executor.UserId, player.UserId) then context:SendEvent(player, "Message", filterResult:GetChatForUserAsync(player.UserId), context.Executor) end end