What is wrong with this code?

why no just do this?

game.Players.PlayerAdded:Connect(function(player)
print(player.Name .." has joined the server")
end)