I tried to put a waitroom script together for my game, but it has errors and I can't figure out what's wrong.

game.Players.PlayerAdded:connect(onPlayerRespawned)
wait(2)
then
game:GetService("TeleportService"):Teleport(4919372173,player) 
  end