For some reason as of least 01/01/2022 my 2013 Chat broke…
In some servers it works, and in others it wont show messages, and it seems to break client sided as some players it breaks for(they can still send messages but can’t see them)
It could be to do with safechat or else its just a bug with roblox.
What do you mean safechat? Like the filter breaking the entire thing?
It’d be helpful if you provided errors?
Could you send the code? We can’t do much without it ngl.
Also any errors like @Jumpathy stated.
1 Like
For some reason there’s no errors.
Local Script
local userInputService = game:GetService("UserInputService")
if userInputService.TouchEnabled then
script.Parent:Destroy()
else
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
print("Keyboard")
end
replicatedstorage = game.ReplicatedStorage
sendmessage = replicatedstorage:WaitForChild("SendChatMessage")
chatframe = script.Parent.ChatFrame
chatbar = script.Parent.ChatBar.TextBox
messagetemplate = script.Message
chatbubbletemplate = script.ChatBubble
local CHAT_COLORS =
{
Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color,
Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color,
Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color,
BrickColor.new("Bright violet").Color,
BrickColor.new("Bright orange").Color,
BrickColor.new("Bright yellow").Color,
BrickColor.new("Light reddish violet").Color,
BrickColor.new("Brick yellow").Color,
}
--Code
function ReceiveChatMessage(sender, text)
local chatcolor = CHAT_COLORS[(GetNameValue(sender) % #CHAT_COLORS) + 1]
local senderf = sender .. ": "
local messageframe = messagetemplate:Clone()
local messagetext = messageframe.MessageText
local playername = messageframe.PlayerName
messageframe.Visible = true
messageframe.Fade.Disabled = false
playername.Text = senderf
messagetext.Text = senderf .. text
playername.TextColor3 = chatcolor
messageframe.Parent = chatframe
for i,v in pairs(chatframe:GetChildren()) do
v.Position = UDim2.new(0, 0, 1, v.Position.Y.Offset-messagetext.TextBounds.Y)
if v.Position.Y.Offset < -209 then
v:Destroy()
end
end
local senderp = game.Players:FindFirstChild(sender)
if senderp then
if senderp.Character then
if senderp.Character:FindFirstChild("Head") then
local chatbubble = chatbubbletemplate:Clone()
chatbubble.Enabled = true
chatbubble.Parent = senderp.Character.Head
chatbubble.TextLabel.Text = text
wait(0)
chatbubble.Body.Size = UDim2.new(0, chatbubble.TextLabel.TextBounds.X+25, 0, chatbubble.TextLabel.TextBounds.Y+15)
game.Debris:addItem(chatbubble, 15)
for i,b in pairs(senderp.Character.Head:GetChildren()) do
if b.Name == "ChatBubble" then
if b ~= chatbubble then
local bbody = b.Body
local btextlabel = b.TextLabel
local btier = b.Tier
local offset = UDim2.new(0, 0, 0, chatbubble.TextLabel.TextBounds.Y+15)
bbody.Position = bbody.Position - offset
btextlabel.Position = btextlabel.Position - offset
btextlabel.TextTransparency = 0.5
btier.Value = btier.Value + 1
if btier.Value > 2 then
b:Destroy()
end
if b:FindFirstChild("Tail") then
b.Tail:Destroy()
end
end
end
end
end
end
end
end
replicatedstorage.ReceiveChatMessage.OnClientEvent:Connect(ReceiveChatMessage)
function onKeyPress(inputObject, gameProcessedEvent)
if not gameProcessedEvent then
if inputObject.KeyCode == Enum.KeyCode.Slash then
wait()
chatbar:CaptureFocus()
end
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
chatbar.FocusLost:Connect(function(send)
if send then
local text = chatbar.Text
if chatbar.Text ~= "" then
chatbar.Text = ""
sendmessage:FireServer(text)
end
end
end)
function GetNameValue(pName)
local value = 0
for index = 1, #pName do
local cValue = string.byte(string.sub(pName, index, index))
local reverseIndex = #pName - index + 1
if #pName%2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex%4 >= 2 then
cValue = -cValue
end
value = value + cValue
end
return value
end```