The reason why nil is printed is because the part function is being called inside of the connect function and nothing is being passed which means nil is being printed. PlayerAdded is also never connected because a function must be passed into connect().
You can fix your code by removing () in the connect function in the last line so that it looks like this
game.Players.PlayerAdded:Connect(part)
A little off topic but I thought I might as well put it here. You should probably account for cases where PlayerAdded is connected after a player has joined resulting in PlayerAdded never firing for that player. This can be caused by many things like having yielding code above where you connect PlayerAdded or your script not starting immediately.
The code below shows a loop being ran after connecting the PlayerAdded to catch any players that might have joined the game after the PlayerAdded function was connected.
local Players = game:GetService("Players")
local function onPlayerAdded(player)
print(player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetChildren() do
task.spawn(onPlayerAdded, player)
end