Hello,
I try to use this script. It has to print when someone joins/leaves the game, however I keep recieving this error. Can someone help me?
The script:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.Name + " joined the game!")
end)
Players.PlayerRemoving:Connect(function(player)
print(player.Name + " left the game!")
end)
Error:
17:58:17.367 - Workspace.PlayerAddedEvents:4: attempt to perform arithmetic on field 'Name' (a string value)

2 comments
OP's script was stolen from Wiki.
Thank you.