--[[**
	Gets the player's primary group if it exists.
	@param [Instance<Player>] Player The player you are checking for. Can also be their UserID.
	@returns [DictionaryOrNil] The player's primary group if it exists, otherwise nil.
**--]]

function GroupService:GetPrimaryGroupAsync(Player)
	for _, Group in ipairs(GroupService:GetGroupsAsync(Player)) do
		if Group.IsPrimary then
			return Group
		end
	end

	return nil
end
