I am having issues with my chat GUI, for some reason it keeps spitting out the same exact error for no absolute visible reason to me, and it will have a funky twist to it as well when I do think I've fixed it. I have FilteringEnabled Enabled because, I want to make my MainFrame compliant with that. I am new to filtering enabled, and am trying to understand how to work with it.
The error is;
ServerScriptService.MainFrameCentral:77:attempt to concatenate local 'plr' (a userdata value)
The Local Script;
--There is previous code
if key:byte() == 13 then
game.Workspace.ChatDevice:InvokeServer(game.Players.LocalPlayer.Name, script.Parent.TextBox.Text)
script.Parent.TextBox.Text = [[Press "/" or click here to chat.]]
end
--There is later code
The Server Script;
function game.Workspace.ChatDevice.OnServerInvoke(plr, chat)
local chatholder = game.ServerStorage.MainFrameData.Chat
chatholder.Chat11.Value = chatholder.Chat10.Value
chatholder.Chat10.Value = chatholder.Chat9.Value
chatholder.Chat9.Value = chatholder.Chat8.Value
chatholder.Chat8.Value = chatholder.Chat7.Value
chatholder.Chat7.Value = chatholder.Chat6.Value
chatholder.Chat6.Value = chatholder.Chat5.Value
chatholder.Chat5.Value = chatholder.Chat4.Value
chatholder.Chat4.Value = chatholder.Chat3.Value
chatholder.Chat3.Value = chatholder.Chat2.Value
chatholder.Chat2.Value = chatholder.Chat1.Value
chatholder.Chat1.Value = plr .. ": " ..chat --This is line 77
for _,v in pairs(game:service("Players"):children()) do
game.Workspace.ChatRefresh:InvokeClient(v, chatholder.Chat1.Value, chatholder.Chat2.Value, chatholder.Chat3.Value, chatholder.Chat4.Value, chatholder.Chat5.Value, chatholder.Chat6.Value, chatholder.Chat7.Value, chatholder.Chat8.Value, chatholder.Chat9.Value, chatholder.Chat10.Value, chatholder.Chat11.Value)
end
end
I don't understand, and in the Server-side Script, even if I did change "plr" to "plr.Name" the chat will work but will show M39a9am3R: M39a9am3R. I have no idea why, if anyone could explain this to me, any help would be appreciated. Thank you.

1 comment
Oh, I didn't know the OnServerInvoke thing automatically ran the Local Player, I get it now. Thank you, I am sure this is the right answer, but I won't get to testing it until later today.