function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if msg then
print(speaker.Name.. msg)
end
end
function onPlayerEntered(Player)
Player.Chatted:Connect(function(msg, recipient)
onChatted(msg, recipient, Player)
end)
end
onPlayerEntered()
The script will go like this: First, the Player will talk. Second, it should print the username and the message. Example: raid6n: Can you be my friend?
The script doesn't work with an output of: 18:07:59.288 - ServerScriptService.Script:11: attempt to index local 'Player' (a nil value)
I don't know why it doesnt work as I defined what "Player" is in line 9
I'm not good at this, so please send an answer if you can. This is a regular script.

38 comments
I’ll see what happens.
ok btw thanks for helping with my other questions ur a great friend
no problem also it works now thanks
have a great day
have a great day
have a great day
have a great day
have a great day
have a great day
have a great day
have a great day
have a great day
have a great day
bruh
big lag
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
oop sorry
Jesus crist-
Jesus crist-
stack overflow moment
lmao