I am trying to make a script that displays everything you say on a textlabel. However, I only want it to display what one person is saying. I have tried this:
local l1 = script.Parent.Frame.TextLabel
game.Players.PlayerAdded:connect(function(plr)
if plr.Name == "marmitem0nster" then
function addMessage(player, text)
l1.Text = "" .. text
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(chat)
addMessage(player.Name, string.sub(chat, 0))
end)
end)
I tested it and it does not work. Can anyone help?
