Folder is not valid member of Player?

I have a script in workspace that manages a NumberValue in a folder inside the player, but sometimes it gives an error saying, Folder is not a valid member of "Player"

game.Players.PlayerAdded:Connect(function(Player)
	local Value = Player.Folder.Value
end)

(As I said, this doesn’t happen all the time, it only happens occasionally.)

image

Is there a way to fix this?

game.Players.PlayerAdded:Connect(function(Player)
	local Value = Player:WaitForChild("Folder").Value
end)

If an infinite yield warning comes up, make sure the folder is actually being created.

An infinite yield warning does not come up.

This is correct, but you should probably also specify a max time: WaitForChild("Folder", time)

Would ensure it waits at most that much time, and no longer.