Problem with getting the first player to join game

So basically, I’m attempting to set up a system which saves the first player to join the game (Sort of making them the “host” of that server.)

However, Players:GetPlayers()[1] seems to return nill, from what I am assuming is the player not yet being loaded in.

However, I can’t find a way to yield until any new player is loaded in, so I’m kind of stumped.

local player = game.Players.PlayerAdded:Wait()