Basically, I made a chat. On the main script, an error occurs on line 20, "attempt to concantenate local 'msg' a nil value" I have no idea whats wrong with it. Nor do I know what this means...
ServerScript:
function UpdateOldLabels(Parent)
for i,v in pairs (Parent:GetChildren()) do
if v.Name:sub(1,4):lower() == "line" then
local LineNumber = v.Name:sub(5)
if LineNumber == 12 then
v:Destroy()
else
v.Name = "line" .. tostring(tonumber(LineNumber) + 1)
v.Position = v.Position - UDim2.new(0, 0, 0.035, 0)
end
end
end
end
function NewLine(parent, plr, msg)
local New = Instance.new("TextLabel", parent)
New.Text = plr.Name .. ": " .. msg
New.Size = UDim2.new(0.35, 0, 0.026, 0)
New.Position = UDim2.new(0, 0, 0.315, 0)
New.BorderSizePixel = 0
New.BackgroundTransparency = 1
New.TextColor3 = Color3.fromRGB(255, 255, 255)
New.TextStrokeTransparency = 1
New.FontSize = "Size10"
New.TextXAlignment = "Left"
New.TextYAlignment = "Top"
New.Name = "Line1"
New.ClipsDescendants = true
end
workspace.Events.Other.Chat.OnServerEvent:connect(function(plr, msg)
for _,v in ipairs(game:GetService("Players"):GetChildren()) do
NewLine(v:WaitForChild("PlayerGui").Chat.Container.ChatLines, plr, msg)
UpdateOldLabels(v:WaitForChild("PlayerGui").Chat.Container.ChatLines)
end
end)
LocalScript:
script.Parent.InputEnded:connect(function()
game.Workspace.Events.Other.Chat:FireServer(game.Players.LocalPlayer, script.Parent.Text)
script.Parent.Text = [[Click here or press the "/" key to chat.]]
end)

3 comments
There's no end in the third or first code; is this not the full script, if not, could you please provide it? :) And are you using a Local or Server script?
This legit is on a video. From a year ago too.
First of all, you have -5 points. You cannot criticize me. This was a year ago. There is no ******* need to reply.