-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
HD Admin version: 1.31.8 (newest version according to HD Admin itself)

The error being given:
"ReplicatedStorage.HDAdminHDClient.Modules.ChatHandler:79: malformed pattern (missing ']') "

This error is given on every new chat message.
My script:
(If being copied for testing, the condition that checks if a player is muted via an "invisleaderstats" folder should be removed)
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
if message.TextSource == nil then return end
local properties = Instance.new("TextChatMessageProperties")
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if player.invisleaderstats.Muted.Value == true and player ~= Players.LocalPlayer then
message.Text = ""
properties.Text = ""
message.Translation = ""
properties.Translation = ""
message.PrefixText = ""
properties.PrefixText = ""
return properties
end
properties.Text = message.Text
properties.Translation = message.Translation
message.PrefixText = ""
properties.PrefixText = "[@" .. player.Name .. "]:"
print(properties.PrefixText)
return properties
endRemoving the square brackets from the PrefixText causes the console error to no longer appear.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels